Documentation

CRM_Profile_Selector_Listings extends CRM_Core_Selector_Base
in package
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.

Table of Contents

Interfaces

CRM_Core_Selector_API
This interface defines the set of functions a class needs to implement to use the CRM/Selector object.

Properties

$_columnHeaders  : array<string|int, mixed>
We use desc to remind us what that column is, name is used in the tpl
$_links  : array<string|int, mixed>
Array of supported links, currently view and edit
$_customFields  : array<string|int, mixed>
The custom fields for this domain.
$_editLink  : bool
Do we enable edit link.
$_fields  : array<string|int, mixed>
The public visible fields to be shown to the user.
$_gid  : int
The group id that we are editing.
$_key  : string
The qfKey of the underlying search
$_linkToUF  : bool
Should we link to the UF Profile.
$_map  : bool
Do we enable mapping of users.
$_multiRecordTableName  : mixed
$_order  : array<string|int, mixed>
The sort order which is computed from the columnHeaders
$_params  : string
The sql params we use to get the list of contacts.
$_permission  : string
The permission mask for this selector
$_profileIds  : array<string|int, mixed>
Store profile ids if multiple profile ids are passed using comma separated.
$_query  : object
Cache the query object.

Methods

__construct()  : CRM_Profile_Selector_Listings
Class constructor.
getColumnHeaders()  : array<string|int, mixed>
Returns the column headers as an array of tuples: (name, sortName (key to the sort array))
getExportFileName()  : string
Name of export file.
getKey()  : string
getPagerParams()  : mixed
Getter for array of the parameters required for creating pager.
getQill()  : string
Return the qill for this selector.
getRows()  : int
Returns all the rows in the given offset and rowCount.
getSortOrder()  : array<string|int, mixed>
Getter for the sorting direction for the fields which will be displayed on the form.
getSummary()  : null
getTemplateFileName()  : string
Compose the template file name from the class name.
getTotalCount()  : int
Returns total number of rows for the query.
links()  : array<string|int, mixed>
This method returns the links that are given for each search row.
setKey()  : mixed
setMultiRecordTableName()  : mixed
Set the _multiRecordTableName to display the result set.
setPermission()  : mixed
Setter for permission.

Properties

$_columnHeaders

We use desc to remind us what that column is, name is used in the tpl

public static array<string|int, mixed> $_columnHeaders

Array of supported links, currently view and edit

public static array<string|int, mixed> $_links = \NULL

$_customFields

The custom fields for this domain.

protected array<string|int, mixed> $_customFields

Do we enable edit link.

protected bool $_editLink

$_fields

The public visible fields to be shown to the user.

protected array<string|int, mixed> $_fields

$_gid

The group id that we are editing.

protected int $_gid

$_key

The qfKey of the underlying search

protected string $_key

$_linkToUF

Should we link to the UF Profile.

protected bool $_linkToUF

$_map

Do we enable mapping of users.

protected bool $_map

$_multiRecordTableName

protected mixed $_multiRecordTableName = \NULL

$_order

The sort order which is computed from the columnHeaders

protected array<string|int, mixed> $_order

$_params

The sql params we use to get the list of contacts.

protected string $_params

$_permission

The permission mask for this selector

protected string $_permission = \NULL

$_profileIds

Store profile ids if multiple profile ids are passed using comma separated.

protected array<string|int, mixed> $_profileIds = []

Currently lets implement this functionality only for dialog mode

$_query

Cache the query object.

protected object $_query

Methods

__construct()

Class constructor.

public __construct(array<string|int, mixed> &$params, array<string|int, mixed> &$customFields[, array<string|int, mixed> $ufGroupIds = NULL ][, bool $map = FALSE ][, bool $editLink = FALSE ][, bool $linkToUF = FALSE ]) : CRM_Profile_Selector_Listings
Parameters
$params : array<string|int, mixed>

the params for the where clause

$customFields : array<string|int, mixed>
$ufGroupIds : array<string|int, mixed> = NULL
$map : bool = FALSE
$editLink : bool = FALSE
$linkToUF : bool = FALSE
Return values
CRM_Profile_Selector_Listings

getColumnHeaders()

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

public & getColumnHeaders([string $action = NULL ][, string $output = NULL ]) : array<string|int, mixed>
Parameters
$action : string = NULL

The action being performed.

$output : string = NULL

What should the result set include (web/email/csv).

Return values
array<string|int, mixed>

the column headers that need to be displayed

getExportFileName()

Name of export file.

public getExportFileName([string $output = 'csv' ]) : string
Parameters
$output : string = 'csv'

Type of output.

Return values
string

name of the file

getKey()

public getKey() : string
Return values
string

getPagerParams()

Getter for array of the parameters required for creating pager.

public getPagerParams(mixed $action, array<string|int, mixed> &$params) : mixed
Parameters
$action : mixed
$params : array<string|int, mixed>

getQill()

Return the qill for this selector.

public getQill() : string
Return values
string

getRows()

Returns all the rows in the given offset and rowCount.

public & getRows(string $action, int $offset, int $rowCount, string $sort[, string $output = NULL ][, string $extraWhereClause = NULL ]) : int
Parameters
$action : string

The action being performed.

$offset : int

The row number to start from.

$rowCount : int

The number of rows to return.

$sort : string

The sql string that describes the sort order.

$output : string = NULL

What should the result set include (web/email/csv).

$extraWhereClause : string = NULL
Return values
int

the total number of rows for this action

getSortOrder()

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

public & getSortOrder(string $action) : array<string|int, mixed>
Parameters
$action : string

the action being performed

Return values
array<string|int, mixed>

the elements that can be sorted along with their properties

getSummary()

public getSummary() : null
Return values
null

getTemplateFileName()

Compose the template file name from the class name.

public getTemplateFileName([string $action = NULL ]) : string
Parameters
$action : string = NULL

The action being performed.

Return values
string

template file name

getTotalCount()

Returns total number of rows for the query.

public getTotalCount(int $action) : int
Parameters
$action : int
Return values
int

Total number of rows

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

public static & links([bool $map = FALSE ][, bool $editLink = FALSE ][, bool $ufLink = FALSE ][, array<string|int, int>|null $gids = NULL ]) : array<string|int, mixed>
Parameters
$map : bool = FALSE
$editLink : bool = FALSE
$ufLink : bool = FALSE
$gids : array<string|int, int>|null = NULL
Return values
array<string|int, mixed>

setKey()

public setKey(mixed $key) : mixed
Parameters
$key : mixed

setMultiRecordTableName()

Set the _multiRecordTableName to display the result set.

public setMultiRecordTableName(array<string|int, mixed> $fields) : mixed

(according to multi record custom field values).

Parameters
$fields : array<string|int, mixed>

setPermission()

Setter for permission.

public setPermission(mixed $permission) : mixed
Parameters
$permission : mixed

        
On this page

Search results