CRM_Core_Selector_API
interface CRM_Core_Selector_API
This interface defines the set of functions a class needs to implement to use the CRM/Selector object.
Using this interface allows us to standardize on multiple things including list display, pagination, sorting and export in multiple formats (CSV is supported right now, XML support will be added as and when needed
Methods
Get pager parameters.
Returns the sort order array for the given action.
Returns the column headers as an array of tuples.
Returns the number of rows for this action.
Returns all the rows in the given offset and rowCount.
Return the template (.tpl) filename.
Return the filename for the exported CSV.
Details
at line 58
getPagerParams(string $action, array $params)
Get pager parameters.
Based on the action, the GET variables and the session state it adds various key => value pairs to the params array including
status - the status message to display. Modifiers will be defined to integrate the total count and the current state of the page: e.g. Displaying Page 3 of 5 csvString - The html string to display for export as csv rowCount - the number of rows to be included
at line 69
array
getSortOrder(string $action)
Returns the sort order array for the given action.
at line 84
array
getColumnHeaders(string $action = NULL, string $type = NULL)
Returns the column headers as an array of tuples.
(name, sortName (key to the sort array))
at line 95
int
getTotalCount(string $action)
Returns the number of rows for this action.
at line 114
int
getRows(string $action, int $offset, int $rowCount, string $sort, string $type = NULL)
Returns all the rows in the given offset and rowCount.
at line 124
string
getTemplateFileName(string $action = NULL)
Return the template (.tpl) filename.
at line 136
string
getExportFileName(string $type = 'csv')
Return the filename for the exported CSV.