class CRM_Event_Selector_Search extends CRM_Core_Selector_Base implements CRM_Core_Selector_API

This class is used to retrieve and display a range of contacts that match the given criteria (specifically for results of advanced search options.

Properties

protected array $_order The sort order which is computed from the columnHeaders from CRM_Core_Selector_Base
protected string $_permission The permission mask for this selector from CRM_Core_Selector_Base
protected string $_key The qfKey of the underlying search from CRM_Core_Selector_Base
$_links This defines two actions- View and Edit.
static array $_columnHeaders We use desc to remind us what that column is, name is used in the tpl
static array $_properties Properties of contact we're interested in displaying
protected boolean $_single Are we restricting ourselves to a single contact
protected boolean $_limit Are we restricting ourselves to a single contact
protected string $_context What context are we being invoked from
protected string $_compContext What component context are we being invoked from
array $_queryParams QueryParams is the array returned by exportValues called on the HTML_QuickForm_Controller for that page.
protected int $_action Represent the type of selector.
protected string $_eventClause The additional clause that we restrict the search with.
protected string $_query The query object.

Methods

string
getActionAttribute(string $match, string $attribute = 'name')

This function gets the attribute for the action that.

static 
links(null $qfKey = NULL, null $context = NULL, null $compContext = NULL)

This method returns the links that are given for each search row.

string
getTemplateFileName(string $action = NULL)

Compose the template file name from the class name.

array
getSortOrder(string $action)

Getter for the sorting direction for the fields which will be displayed on the form.

setPermission($permission)

Setter for permission.

array
getQill()

Get the display text in plain language for the search to display on the results page

null
getSummary()

No description

setKey($key)

No description

string
getKey()

No description

__construct(array $queryParams, const|int $action = CRM_Core_Action::NONE, string $eventClause = NULL, bool $single = FALSE, int $limit = NULL, string $context = 'search', null $compContext = NULL)

Class constructor.

setLimit(int $limit)

Can be used to alter the number of participation returned from a buildForm hook.

getPagerParams(string $action, array $params)

Getter for array of the parameters required for creating pager.

int
getTotalCount(string $action)

Returns total number of rows for the query.

int
getRows(string $action, int $offset, int $rowCount, string $sort, string $output = NULL)

Returns all the rows in the given offset and rowCount.

getQILL()

No description

array
getColumnHeaders(string $action = NULL, string $output = NULL)

Returns the column headers as an array of tuples: (name, sortName (key to the sort array))

mixed
alphabetQuery()

No description

string
getQuery()

No description

string
getExportFileName(string $output = 'csv')

Name of export file.

Details

string getActionAttribute(string $match, string $attribute = 'name')

This function gets the attribute for the action that.

it matches.

Parameters

string $match the action to match against
string $attribute the attribute to return ( name, link, title )

Return Value

string the attribute that matches the action if any

This method returns the links that are given for each search row.

currently the links added for each row are

  • View
  • Edit

Parameters

null $qfKey
null $context
null $compContext

in CRM_Core_Selector_Base at line 108
string getTemplateFileName(string $action = NULL)

Compose the template file name from the class name.

Parameters

string $action The action being performed.

Return Value

string template file name

in CRM_Core_Selector_Base at line 120
array getSortOrder(string $action)

Getter for the sorting direction for the fields which will be displayed on the form.

Parameters

string $action the action being performed

Return Value

array the elements that can be sorted along with their properties

in CRM_Core_Selector_Base at line 154
setPermission($permission)

Setter for permission.

Parameters

$permission

in CRM_Core_Selector_Base at line 168
array getQill()

Get the display text in plain language for the search to display on the results page

FIXME: the current internationalisation is bad, but should more or less work on most of "European" languages

Return Value

array array of strings

in CRM_Core_Selector_Base at line 175
null getSummary()

Return Value

null

in CRM_Core_Selector_Base at line 182
setKey($key)

Parameters

$key

in CRM_Core_Selector_Base at line 189
string getKey()

Return Value

string

at line 160
CRM_Event_Selector_Search __construct(array $queryParams, const|int $action = CRM_Core_Action::NONE, string $eventClause = NULL, bool $single = FALSE, int $limit = NULL, string $context = 'search', null $compContext = NULL)

Class constructor.

Parameters

array $queryParams Array of parameters for query.
const|int $action
  • action of search basic or advanced.
string $eventClause If the caller wants to further restrict the search (used in participations).
bool $single Are we dealing only with one contact?.
int $limit How many participations do we want returned.
string $context
null $compContext

Return Value

CRM_Event_Selector_Search

at line 199
setLimit(int $limit)

Can be used to alter the number of participation returned from a buildForm hook.

Parameters

int $limit How many participations do we want returned.

at line 260
getPagerParams(string $action, array $params)

Getter for array of the parameters required for creating pager.

Parameters

string $action The action being performed.
array $params The array that the pagerParams will be inserted into.

at line 282
int getTotalCount(string $action)

Returns total number of rows for the query.

Parameters

string $action The action being performed.

Return Value

int the total number of rows for this action

at line 308
int getRows(string $action, int $offset, int $rowCount, string $sort, string $output = NULL)

Returns all the rows in the given offset and rowCount.

Parameters

string $action The action being performed.
int $offset The row number to start from.
int $rowCount The number of rows to return.
string $sort The sql string that describes the sort order.
string $output What should the result set include (web/email/csv).

Return Value

int the total number of rows for this action

at line 437
getQILL()

at line 453
array getColumnHeaders(string $action = NULL, string $output = NULL)

Returns the column headers as an array of tuples: (name, sortName (key to the sort array))

Parameters

string $action The action being performed.
string $output What should the result set include (web/email/csv).

Return Value

array the column headers that need to be displayed

at line 512
mixed alphabetQuery()

Return Value

mixed

at line 519
string getQuery()

Return Value

string

at line 532
string getExportFileName(string $output = 'csv')

Name of export file.

Parameters

string $output Type of output.

Return Value

string the fileName which we will munge to skip spaces and special characters to avoid various browser issues