Documentation

CRM_Case_BAO_Query extends CRM_Core_BAO_Query
in package

Tags
copyright

CiviCRM LLC https://civicrm.org/licensing

Table of Contents

Methods

addCustomFormFields()  : mixed
buildSearchForm()  : void
Add all the elements shared between case search and advanced search.
defaultReturnProperties()  : array<string|int, mixed>|null
extraReturnProperties()  : array<string|int, mixed>|null
This includes any extra fields that might need for export etc.
from()  : string
Build from clause.
getFields()  : array<string|int, mixed>
Get fields.
getSearchFieldMetadata()  : mixed
Get the metadata for fields to be included on the case search form.
qill()  : string
Getter for the qill object.
searchAction()  : mixed
Possibly unnecessary function.
select()  : mixed
Build select for Case.
tableNames()  : mixed
where()  : mixed
Given a list of conditions in query generate the required where clause.
whereClauseSingle()  : mixed
Where clause for a single field.
getFieldName()  : string
Get the name of the field.
getLegacySupportedFields()  : array<string|int, mixed>
Get legacy fields which we still maybe support.

Methods

addCustomFormFields()

public static addCustomFormFields(CRM_Core_Form &$form, array<string|int, mixed> $extends) : mixed
Parameters
$form : CRM_Core_Form
$extends : array<string|int, mixed>

defaultReturnProperties()

public static defaultReturnProperties(mixed $mode[, bool $includeCustomFields = TRUE ]) : array<string|int, mixed>|null
Parameters
$mode : mixed
$includeCustomFields : bool = TRUE
Return values
array<string|int, mixed>|null

extraReturnProperties()

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

public static extraReturnProperties(string $mode) : array<string|int, mixed>|null
Parameters
$mode : string
Return values
array<string|int, mixed>|null

from()

Build from clause.

public static from(string $name, string $mode, string $side) : string
Parameters
$name : string
$mode : string
$side : string
Return values
string

getFields()

Get fields.

public static & getFields([bool $excludeActivityFields = FALSE ]) : array<string|int, mixed>
Parameters
$excludeActivityFields : bool = FALSE
Return values
array<string|int, mixed>

getSearchFieldMetadata()

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

public static getSearchFieldMetadata() : mixed
Tags
todo

ideally this would be a trait included on the case search & advanced search rather than a static function.

qill()

Getter for the qill object.

public qill() : string
Return values
string

searchAction()

Possibly unnecessary function.

public static searchAction(mixed &$row, int $id) : mixed
Parameters
$row : mixed
$id : int

tableNames()

public static tableNames(mixed &$tables) : mixed
Parameters
$tables : mixed

whereClauseSingle()

Where clause for a single field.

public static whereClauseSingle(array<string|int, mixed> &$values, CRM_Contact_BAO_Query &$query) : mixed

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
$values : array<string|int, mixed>
$query : CRM_Contact_BAO_Query
Tags
throws
CRM_Core_Exception

getFieldName()

Get the name of the field.

protected static getFieldName(array<string|int, mixed> $values) : string
Parameters
$values : array<string|int, mixed>
Return values
string

getLegacySupportedFields()

Get legacy fields which we still maybe support.

protected static getLegacySupportedFields() : array<string|int, mixed>

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

Return values
array<string|int, mixed>

        
On this page

Search results