class CRM_Contribute_BAO_Query extends CRM_Core_BAO_Query

Properties

static $_contribOrSoftCredit
static $_contribRecurPayment

Methods

static 
addCustomFormFields(CRM_Core_Form $form, array $extends)

No description

string
qill()

Getter for the qill object.

static 
searchAction($row, int $id)

Possibly unnecessary function.

static 
tableNames($tables)

Get table names.

static array
getFields(bool $checkPermission = TRUE)

Function get the searchable fields for contribution.

static 
select(CRM_Contact_BAO_Query $query)

If contributions are involved, add the specific contribute fields.

static 
where(CRM_Contact_BAO_Query $query)

Get where clause.

static 
whereClauseSingle(array $values, CRM_Contact_BAO_Query $query)

Get where clause for a single value.

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

Get from clause.

static 
initializeAnySoftCreditClause(CRM_Contact_BAO_Query $query)

Initialise the soft credit clause.

static bool
isSoftCreditOptionEnabled(array $queryParams = array())

Check if soft credits are enables.

static array
softCreditReturnProperties(bool $isExportMode = FALSE)

Get return properties for soft credits.

static 
selectorReturnProperties()

Get the list of fields required to populate the selector.

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

Function you should avoid.

static 
buildSearchForm(CRM_Core_Form $form)

Add all the elements shared between contribute search and advnaced search.

static bool
buildDateWhere(array $values, object $query, string $name, string $field, string $title)

Add the where for dates.

static bool|array
formRule(array $fields, array $files, CRM_Core_Form $form)

Custom form rules.

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 66
string qill()

Getter for the qill object.

Return Value

string

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

Possibly unnecessary function.

Parameters

$row
int $id

at line 1017
static tableNames($tables)

Get table names.

Parameters

$tables

at line 49
static array getFields(bool $checkPermission = TRUE)

Function get the searchable fields for contribution.

This is basically the contribution fields plus some related entity fields.

Parameters

bool $checkPermission

Return Value

array Associative array of contribution fields

at line 63
static select(CRM_Contact_BAO_Query $query)

If contributions are involved, add the specific contribute fields.

Parameters

CRM_Contact_BAO_Query $query

at line 114
static where(CRM_Contact_BAO_Query $query)

Get where clause.

Parameters

CRM_Contact_BAO_Query $query

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

Get where clause for a single value.

Parameters

array $values
CRM_Contact_BAO_Query $query

at line 507
static NULL|string from(string $name, string $mode, string $side)

Get from clause.

Parameters

string $name
string $mode
string $side

Return Value

NULL|string

at line 644
static initializeAnySoftCreditClause(CRM_Contact_BAO_Query $query)

Initialise the soft credit clause.

Parameters

CRM_Contact_BAO_Query $query

at line 666
static bool isSoftCreditOptionEnabled(array $queryParams = array())

Check if soft credits are enables.

Parameters

array $queryParams

Return Value

bool

at line 707
static array softCreditReturnProperties(bool $isExportMode = FALSE)

Get return properties for soft credits.

Parameters

bool $isExportMode

Return Value

array

at line 726
static selectorReturnProperties()

Get the list of fields required to populate the selector.

The default return properties array returns far too many fields for 'everyday use. Every field you add to this array kills a small kitten so add carefully.

at line 774
static array|NULL defaultReturnProperties(int $mode, bool $includeCustomFields = TRUE)

Function you should avoid.

This function returns default properties for contribution queries. However, they are far more than are required in 'most' cases and you should always try to return the return properties you actually require.

It would be nice to throw an e-notice when this is called but it would trash the tests :-(.

Parameters

int $mode
bool $includeCustomFields

Return Value

array|NULL

at line 879
static buildSearchForm(CRM_Core_Form $form)

Add all the elements shared between contribute search and advnaced search.

Parameters

CRM_Core_Form $form

at line 1044
static bool buildDateWhere(array $values, object $query, string $name, string $field, string $title)

Add the where for dates.

Parameters

array $values Array of query values.
object $query The query object.
string $name Query field that is set.
string $field Name of field to be set.
string $title Title of the field.

Return Value

bool

at line 1067
static bool|array formRule(array $fields, array $files, CRM_Core_Form $form)

Custom form rules.

Parameters

array $fields
array $files
CRM_Core_Form $form

Return Value

bool|array