Documentation

CRM_Case_Selector_Search extends CRM_Core_Selector_Base
in package

This class is used to retrieve and display a range of contacts that match the given criteria.

Table of Contents

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>
This defines two actions- View and Edit.
$_properties  : array<string|int, mixed>
Properties of contact we're interested in displaying
$_queryParams  : array<string|int, mixed>
QueryParams is the array returned by exportValues called on the HTML_QuickForm_Controller for that page.
$_action  : int
Represent the type of selector
$_additionalClause  : string
The additional clause that we restrict the search with
$_context  : string
What context are we being invoked from
$_key  : string
The qfKey of the underlying search
$_limit  : bool
Are we restricting ourselves to a single contact
$_order  : array<string|int, mixed>
The sort order which is computed from the columnHeaders
$_permission  : string
The permission mask for this selector
$_query  : CRM_Contact_BAO_Query
The query object
$_single  : bool
Are we restricting ourselves to a single contact
$_actionLinks  : array<string|int, mixed>
The action links that we need to display for the browse screen.

Methods

__construct()  : CRM_Case_Selector_Search
Class constructor.
actionLinks()  : array<string|int, mixed>
Get the action links for this page.
addCaseActivityLinks()  : string
Add the set of "actionLinks" to the case activity
alphabetQuery()  : mixed
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()  : array<string|int, mixed>
Get the display text in plain language for the search to display on the results page
getQILL()  : mixed
getQuery()  : CRM_Contact_BAO_Query
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.
permissionedActionLinks()  : array<string|int, mixed>|null
setKey()  : mixed
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

This defines two actions- View and Edit.

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

$_properties

Properties of contact we're interested in displaying

public static array<string|int, mixed> $_properties = ['contact_id', 'contact_type', 'sort_name', 'display_name', 'case_id', 'case_subject', 'case_status_id', 'case_status', 'case_type_id', 'case_type', 'case_role', 'phone']

$_queryParams

QueryParams is the array returned by exportValues called on the HTML_QuickForm_Controller for that page.

public array<string|int, mixed> $_queryParams

$_action

Represent the type of selector

protected int $_action

$_additionalClause

The additional clause that we restrict the search with

protected string $_additionalClause

$_context

What context are we being invoked from

protected string $_context = \NULL

$_key

The qfKey of the underlying search

protected string $_key

$_limit

Are we restricting ourselves to a single contact

protected bool $_limit = \NULL

$_order

The sort order which is computed from the columnHeaders

protected array<string|int, mixed> $_order

$_permission

The permission mask for this selector

protected string $_permission = \NULL

$_single

Are we restricting ourselves to a single contact

protected bool $_single = \FALSE

The action links that we need to display for the browse screen.

private static array<string|int, mixed> $_actionLinks

Methods

__construct()

Class constructor.

public __construct(array<string|int, mixed> &$queryParams[, int $action = CRM_Core_Action::NONE ][, string $additionalClause = NULL ][, bool $single = FALSE ][, int $limit = NULL ][, string $context = 'search' ]) : CRM_Case_Selector_Search
Parameters
$queryParams : array<string|int, mixed>

Array of parameters for query.

$action : int = CRM_Core_Action::NONE
  • action of search basic or advanced.
$additionalClause : string = NULL

If the caller wants to further restrict the search (used in participations).

$single : bool = FALSE

Are we dealing only with one contact?.

$limit : int = NULL

How many signers do we want returned.

$context : string = 'search'
Return values
CRM_Case_Selector_Search

Get the action links for this page.

public static actionLinks() : array<string|int, mixed>
Return values
array<string|int, mixed>

Add the set of "actionLinks" to the case activity

public static addCaseActivityLinks(int $caseID, int $contactID, int $userID, string $context, CRM_Activity_BAO_Activity $dao[, bool $allowView = TRUE ]) : string
Parameters
$caseID : int
$contactID : int
$userID : int
$context : string
$dao : CRM_Activity_BAO_Activity
$allowView : bool = TRUE
Return values
string

$linksMarkup

alphabetQuery()

public alphabetQuery() : mixed

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()

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

public getQill() : array<string|int, mixed>

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

Return values
array<string|int, mixed>

array of strings

getQILL()

public getQILL() : mixed
Tags
inheritDoc

getRows()

Returns all the rows in the given offset and rowCount.

public & getRows(string $action, int $offset, int $rowCount, string $sort[, string $output = 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).

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
Return values
int

Total number of rows

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

public static & links([bool $isDeleted = FALSE ][, string|null $key = NULL ]) : array<string|int, mixed>

currently the links added for each row are

  • View
  • Edit
Parameters
$isDeleted : bool = FALSE
$key : string|null = NULL
Return values
array<string|int, mixed>
public static permissionedActionLinks(int $caseID, int $contactID, int $userID, string $context, int $activityTypeID, int $activityDeleted, int $activityID[, bool $allowView = TRUE ]) : array<string|int, mixed>|null
Parameters
$caseID : int
$contactID : int
$userID : int
$context : string
$activityTypeID : int
$activityDeleted : int
$activityID : int
$allowView : bool = TRUE
Return values
array<string|int, mixed>|null

setKey()

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

setPermission()

Setter for permission.

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

        
On this page

Search results