CRM_Mailing_Selector_Event
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 null
- $_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
- $_event : sting
- What event type are we browsing?
- $_is_distinct : bool
- Should we only count distinct contacts?
- $_job_id : int
- Do we want events tied to a specific job?
- $_mailing_id : int
- Which mailing are we browsing events from?
- $_url_id : int
- For click-through events, do we only want those from a specific url?
Methods
- __construct() : CRM_Mailing_Selector_Event
- Class constructor.
- eventToTitle() : string
- Get the title for the mailing event type.
- getColumnHeaders() : array<string|int, mixed>
- Returns the column headers as an array of tuples: (name, sortName (key to the sort array))
- getExportFileName() : string|null
- 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.
- getTitle() : string
- Get the title of the event.
- 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
- setPermission() : mixed
- Setter for permission.
Properties
$_columnHeaders
We use desc to remind us what that column is, name is used in the tpl
public
array<string|int, mixed>
$_columnHeaders
$_links
Array of supported links, currently null
public
static array<string|int, mixed>
$_links
= \NULL
$_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
$_event
What event type are we browsing?
private
sting
$_event
$_is_distinct
Should we only count distinct contacts?
private
bool
$_is_distinct
$_job_id
Do we want events tied to a specific job?
private
int
$_job_id
$_mailing_id
Which mailing are we browsing events from?
private
int
$_mailing_id
$_url_id
For click-through events, do we only want those from a specific url?
private
int
$_url_id
Methods
__construct()
Class constructor.
public
__construct(string $event, bool $distinct, int $mailing[, int $job = NULL ][, int $url = NULL ]) : CRM_Mailing_Selector_Event
Parameters
- $event : string
-
The event type (queue/delivered/open...).
- $distinct : bool
-
Count only distinct contact events?.
- $mailing : int
-
ID of the mailing to query.
- $job : int = NULL
-
ID of the job to query. If null, all jobs from $mailing are queried.
- $url : int = NULL
-
If the event type is a click-through, do we want only those from a specific url?.
Return values
CRM_Mailing_Selector_EventeventToTitle()
Get the title for the mailing event type.
public
eventToTitle() : string
Return values
stringgetColumnHeaders()
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|null
Parameters
- $output : string = 'csv'
-
Type of output.
Return values
string|null —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 ]) : 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
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
getTitle()
Get the title of the event.
public
getTitle() : string
Return values
stringgetTotalCount()
Returns total number of rows for the query.
public
getTotalCount(string $action) : int
Parameters
- $action : string
Return values
int —Total number of rows
links()
This method returns the links that are given for each search row.
public
static & links() : array<string|int, mixed>
Return values
array<string|int, mixed>setKey()
public
setKey(mixed $key) : mixed
Parameters
- $key : mixed
setPermission()
Setter for permission.
public
setPermission(mixed $permission) : mixed
Parameters
- $permission : mixed