class CRM_Case_BAO_Query extends CRM_Core_BAO_Query

Methods

static 
addCustomFormFields(CRM_Core_Form $form, array $extends)

No description

static array
getLegacySupportedFields()

Get legacy fields which we still maybe support.

string
qill()

Getter for the qill object.

static 
searchAction($row, int $id)

Possibly unnecessary function.

static 
tableNames($tables)

No description

static string
getFieldName(array $values)

Get the name of the field.

static array
getFields(bool $excludeActivityFields = FALSE)

Get fields.

static 
select(CRM_Contact_BAO_Query $query)

Build select for Case.

static 
where(CRM_Contact_BAO_Query $query)

Given a list of conditions in query generate the required where clause.

static 
whereClauseSingle(array $values, CRM_Contact_BAO_Query $query)

Where clause for a single field.

static string
from(string $name, string $mode, string $side)

Build from clause.

static array|null
defaultReturnProperties($mode, bool $includeCustomFields = TRUE)

No description

static array|null
extraReturnProperties(string $mode)

This includes any extra fields that might need for export etc.

static 
getSearchFieldMetadata()

Get the metadata for fields to be included on the case search form.

static 
buildSearchForm(CRM_Case_Form_Search $form)

Add all the elements shared between case search and advanced search.

Details

in CRM_Core_BAO_Query at line 41
static addCustomFormFields(CRM_Core_Form $form, array $extends)

Parameters

CRM_Core_Form $form
array $extends

in CRM_Core_BAO_Query at line 69
static protected array getLegacySupportedFields()

Get legacy fields which we still maybe support.

These are contribution specific but I think it's ok to have one list of legacy supported params in a central place.

Return Value

array

at line 596
string qill()

Getter for the qill object.

Return Value

string

in CRM_Core_BAO_Query at line 97
static searchAction($row, int $id)

Possibly unnecessary function.

Parameters

$row
int $id

at line 677
static tableNames($tables)

Parameters

$tables

in CRM_Core_BAO_Query at line 111
static protected string getFieldName(array $values)

Get the name of the field.

Parameters

array $values

Return Value

string

at line 42
static array getFields(bool $excludeActivityFields = FALSE)

Get fields.

Parameters

bool $excludeActivityFields

Return Value

array

at line 58
static select(CRM_Contact_BAO_Query $query)

Build select for Case.

Parameters

CRM_Contact_BAO_Query $query

at line 222
static where(CRM_Contact_BAO_Query $query)

Given a list of conditions in query generate the required where clause.

Parameters

CRM_Contact_BAO_Query $query

at line 264
static whereClauseSingle(array $values, CRM_Contact_BAO_Query $query)

Where clause for a single field.

CRM-17120 adds a test that checks the Qill on some of these parameters. However, I couldn't find a way, other than via test, to access the case_activity options in the code below and invalid sql was returned. Perhaps the options are just legacy?

Also, CRM-17120 locks in the Qill - but it probably is not quite right as I see 'Activity Type = Scheduled' (rather than activity status).

See CRM_Case_BAO_QueryTest for more.

Parameters

array $values
CRM_Contact_BAO_Query $query

Exceptions

CRM_Core_Exception

at line 524
static string from(string $name, string $mode, string $side)

Build from clause.

Parameters

string $name
string $mode
string $side

Return Value

string

at line 606
static array|null defaultReturnProperties($mode, bool $includeCustomFields = TRUE)

Parameters

$mode
bool $includeCustomFields

Return Value

array|null

at line 655
static array|null extraReturnProperties(string $mode)

This includes any extra fields that might need for export etc.

Parameters

string $mode

Return Value

array|null

at line 693
static getSearchFieldMetadata()

Get the metadata for fields to be included on the case search form.

at line 721
static buildSearchForm(CRM_Case_Form_Search $form)

Add all the elements shared between case search and advanced search.

Parameters

CRM_Case_Form_Search $form