CRM_Core_Selector_Controller
class CRM_Core_Selector_Controller
This class is a generic class to be used when we want to display a list of rows along with a set of associated actions
Centralizing this code enables us to write a generic lister and enables us to automate the export process. To use this class, the object has to implement the Selector/Api.interface.php class
Constants
SESSION |
|
TEMPLATE |
|
TRANSFER |
|
EXPORT |
|
SCREEN |
|
|
Properties
protected object | $_object | A CRM Object that implements CRM_Core_Selector_API. | |
protected CRM_Utils_Sort | $_sort | ||
protected int | $_sortID | The current column to sort on | |
protected array | $_sortOrder | The sortOrder array | |
protected CRM_Utils_Pager | $_pager | ||
protected int | $_pageID | The pageID | |
protected int | $_pagerOffset | Offset | |
protected int | $_pagerRowCount | Number of rows to return | |
protected int | $_total | Total number of rows | |
protected int | $_action | The objectAction for the WebObject | |
protected string | $_content | This caches the content for the display system | |
protected bool | $_embedded | Is this object being embedded in another object. If so the display routine needs to not do any work. (The parent object takes care of the display) | |
protected bool | $_print | Are we in print mode? if so we need to modify the display functionality to do a minimal display :) | |
protected Object | $_store | The storage object (typically a form or a page) | |
protected int | $_output | Output target, session, template or both? | |
protected int | $_prefix | Prefif for the selector variables | |
static CRM_Core_Smarty | $_template | Cache the smarty template for efficiency reasons | |
static array | $_properties | Array of properties that the controller dumps into the output object | |
protected bool | $_dynamicAction | Should we compute actions dynamically (since they are quite verbose) |
Methods
Class constructor.
Have the GET vars changed, i.e. pageId or sortId that forces us to recompute the search values
Heart of the Controller. This is where all the action takes place
Default function for qill, if needed to be implemented, we expect the subclass to do it
No description
Getter for pager.
Getter for sort.
Move the variables from the session to the template.
Setter for embedded.
Getter for embedded.
Setter for print.
Getter for print.
No description
No description
Details
at line 197
CRM_Core_Selector_Controller
__construct(CRM_Core_Selector_API $object, int $pageID, int $sortID, int $action, CRM_Core_Page|CRM_Core_Form $store = NULL, int $output = self::TEMPLATE, null $prefix = NULL, null $case = NULL)
Class constructor.
at line 265
bool
hasChanged(int $reset)
Have the GET vars changed, i.e. pageId or sortId that forces us to recompute the search values
at line 303
void
run()
Heart of the Controller. This is where all the action takes place
The rows are fetched and stored depending on the type of output needed
For export/printing all rows are selected.
for displaying on screen paging parameters are used to display the required rows.
also depending on output type of session or template rows are appropriately stored in session or template variables are updated.
at line 413
array
getRows(CRM_Core_Form $form)
Retrieve rows.
at line 432
string
getQill()
Default function for qill, if needed to be implemented, we expect the subclass to do it
at line 439
mixed
getSummary()
at line 448
CRM_Utils_Pager
getPager()
Getter for pager.
at line 457
CRM_Utils_Sort
getSort()
Getter for sort.
at line 466
void
moveFromSessionToTemplate()
Move the variables from the session to the template.
at line 510
void
setEmbedded(bool $embedded)
Setter for embedded.
at line 520
bool
getEmbedded()
Getter for embedded.
at line 531
void
setPrint(bool $print)
Setter for print.
at line 541
bool
getPrint()
Getter for print.