class CRM_Profile_Selector_Listings 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 Array of supported links, currently view and edit
static array $_columnHeaders We use desc to remind us what that column is, name is used in the tpl
protected string $_params The sql params we use to get the list of contacts.
protected array $_fields The public visible fields to be shown to the user.
protected array $_customFields The custom fields for this domain.
protected object $_query Cache the query object.
protected object $_options Cache the expanded options list if any.
protected int $_gid The group id that we are editing.
protected boolean $_map Do we enable mapping of users.
$_editLink Do we enable edit link.
protected boolean $_linkToUF Should we link to the UF Profile.
protected $_profileIds Store profile ids if multiple profile ids are passed using comma separated.
protected $_multiRecordTableName

Methods

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

This function gets the attribute for the action that.

static 
links(bool $map = FALSE, bool $editLink = FALSE, bool $ufLink = FALSE, null $gids = 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()

Return the qill for this selector.

null
getSummary()

No description

setKey($key)

No description

string
getKey()

No description

__construct(array $params, array $customFields, array $ufGroupIds = NULL, bool $map = FALSE, bool $editLink = FALSE, bool $linkToUF = FALSE)

Class constructor.

getPagerParams(string $action, array $params)

Getter for array of the parameters required for creating pager.

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

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

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, string $extraWhereClause = NULL)

Returns all the rows in the given offset and rowCount.

string
getExportFileName(string $output = 'csv')

Name of export file.

setMultiRecordTableName(array $fields)

Set the _multiRecordTableName to display the result set.

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.

Parameters

bool $map
bool $editLink
bool $ufLink
null $gids

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

at line 421
array getQill()

Return the qill for this selector.

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 139
CRM_Profile_Selector_Listings __construct(array $params, array $customFields, array $ufGroupIds = NULL, bool $map = FALSE, bool $editLink = FALSE, bool $linkToUF = FALSE)

Class constructor.

Parameters

array $params the params for the where clause
array $customFields
array $ufGroupIds
bool $map
bool $editLink
bool $linkToUF

Return Value

CRM_Profile_Selector_Listings

at line 273
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 295
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 390
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 444
int getRows(string $action, int $offset, int $rowCount, string $sort, string $output = NULL, string $extraWhereClause = 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).
string $extraWhereClause

Return Value

int the total number of rows for this action

at line 740
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

at line 751
setMultiRecordTableName(array $fields)

Set the _multiRecordTableName to display the result set.

(according to multi record custom field values).

Parameters

array $fields