CRM_Activity_Selector_Activity
extends CRM_Core_Selector_Base
in package
implements
CRM_Core_Selector_API
This class is used to retrieve and display activities for a contact.
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
- $_activityTypeIDs : mixed
- $_admin : mixed
- $_contactId : int
- ContactId - contact id of contact whose activies are displayed
- $_context : mixed
- $_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
- $_viewOptions : mixed
Methods
- __construct() : CRM_Activity_Selector_Activity
- Class constructor.
- actionLinks() : array<string|int, mixed>
- This method returns the action links that are given for each search row.
- 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
- 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() : 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.
- _getColumnHeaders() : array<string|int, mixed>
- Get colunmn headers for search selector.
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
$_activityTypeIDs
protected
mixed
$_activityTypeIDs
$_admin
protected
mixed
$_admin
$_contactId
ContactId - contact id of contact whose activies are displayed
protected
int
$_contactId
$_context
protected
mixed
$_context
$_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
$_viewOptions
protected
mixed
$_viewOptions
Methods
__construct()
Class constructor.
public
__construct(int $contactId, int $permission[, bool $admin = FALSE ][, string $context = 'activity' ][, null $activityTypeIDs = NULL ]) : CRM_Activity_Selector_Activity
Parameters
- $contactId : int
-
Contact whose activities we want to display.
- $permission : int
-
The permission we have for this contact.
- $admin : bool = FALSE
- $context : string = 'activity'
- $activityTypeIDs : null = NULL
Return values
CRM_Activity_Selector_ActivityactionLinks()
This method returns the action links that are given for each search row.
public
static actionLinks(int $activityTypeId[, int $sourceRecordId = NULL ][, bool $accessMailingReport = FALSE ][, int $activityId = NULL ][, null $key = NULL ][, null $compContext = NULL ]) : array<string|int, mixed>
currently the action links added for each row are
- View
Parameters
- $activityTypeId : int
- $sourceRecordId : int = NULL
- $accessMailingReport : bool = FALSE
- $activityId : int = NULL
- $key : null = NULL
- $compContext : null = NULL
Return values
array<string|int, 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
stringgetPagerParams()
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
getRows()
Returns all the rows in the given offset and rowCount.
public
& getRows(string $action, int $offset, int $rowCount, string $sort[, string $output = NULL ][, null $case = 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).
- $case : null = 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
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
getTotalCount()
Returns total number of rows for the query.
public
getTotalCount(string $action[, null $case = NULL ]) : int
Parameters
- $action : string
-
Action being performed.
- $case : null = NULL
Return values
int —Total number of rows
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
_getColumnHeaders()
Get colunmn headers for search selector.
private
static & _getColumnHeaders() : array<string|int, mixed>