CRM_Core_Selector_Base
in package
A simple base class for objects that need to implement the selector api interface. This class provides common functionality with regard to actions and display names
Tags
Table of Contents
Properties
- $_key : string
- The qfKey of the underlying search
- $_order : array<string|int, mixed>
- The sort order which is computed from the columnHeaders
- $_permission : string
- The permission mask for this selector
Methods
- getKey() : string
- getQill() : array<string|int, mixed>
- Get the display text in plain language for the search to display on the results page
- 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.
- links() : mixed
- This is a static virtual function returning reference on links array. Each inherited class must redefine this function
- setKey() : mixed
- setPermission() : mixed
- Setter for permission.
Properties
$_key
The qfKey of the underlying search
protected
string
$_key
$_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
Methods
getKey()
public
getKey() : string
Return values
stringgetQill()
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
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
nullgetTemplateFileName()
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
links()
This is a static virtual function returning reference on links array. Each inherited class must redefine this function
public
static & links() : mixed
links is an array of associative arrays. Each element of the array has at least 3 fields
name : the name of the link url : the URI to be used for this link qs : the parameters to the above url along with any dynamic substitutions title : A more descriptive name, typically used in breadcrumbs / navigation
setKey()
public
setKey(mixed $key) : mixed
Parameters
- $key : mixed
setPermission()
Setter for permission.
public
setPermission(mixed $permission) : mixed
Parameters
- $permission : mixed