ListController Class Reference

Detailed Description

ListController is used to load Node lists.

The controller supports the following actions:

Action default
Load the specified list of Node instances.

Parameter Description
in className The entity type to list instances of
in limit The maximum number of instances to return. If omitted, all instances (beginning at the offset parameter) will be returned (optional)
in offset The index of the first instance to return, based on the current sorting. The index is 0-based. If omitted, 0 is assumed (optional)
in sortFieldName The field name to sort the list by. Must be one of the fields of the type selected by the className parameter. If omitted, the sorting is undefined (optional)
in sortDirection The direction to sort the list. Must be either asc for ascending or desc for descending (optional, default: asc)
in query A query condition encoded in RQL to be used with StringQuery::setRQLConditionString()
in translateValues Boolean whether list values should be translated to their display values (optional, default: false)
in completeObjects Boolean whether to return all object attributes or only the display values using NodeUtil::removeNonDisplayValues (optional, default: false)
in values Comma separated list of node values to return, if completeObjects is set to false (optional, default: display values)
out list Array of Node instances according to the given input parameters
out totalCount The total number of instances matching the passed parameters
Response Actions
ok In all cases
Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 51 of file ListController.php.

+ Inheritance diagram for ListController:

Protected Member Functions

 validate ()
 
 doExecute ($method=null)
 
 getObjects ($type, $queryCondition, $sortArray, $pagingInfo)
 
 modifyModel (&$nodes)
 
- Protected Member Functions inherited from Controller
 validate ()
 
 doExecute ($method=null)
 
 executeSubAction ($action)
 
 redirect ($location, $key=null, $data=null)
 
 getLogger ()
 
 getSession ()
 
 getPersistenceFacade ()
 
 getPermissionManager ()
 
 getActionMapper ()
 
 getLocalization ()
 
 getMessage ()
 
 getConfiguration ()
 
 requireTransaction ()
 
 endTransaction ($commit)
 
 isLocalizedRequest ()
 
 checkLanguageParameter ()
 
 generateCsrfToken ($name)
 
 validateCsrfToken ($name)
 
 getLocalSessionValue ($key, $default=null)
 
 setLocalSessionValue ($key, $value)
 
 clearLocalSessionValues ()
 

Additional Inherited Members

- Public Member Functions inherited from Controller
 __construct (Session $session, PersistenceFacade $persistenceFacade, PermissionManager $permissionManager, ActionMapper $actionMapper, Localization $localization, Message $message, Configuration $configuration)
 
 initialize (Request $request, Response $response)
 
 execute ($method=null)
 
 getRequest ()
 
 getResponse ()
 
- Public Attributes inherited from Controller
const CSRF_TOKEN_PARAM = 'csrf_token'
 

Member Function Documentation

validate ( )
protected
See also
Controller::validate()

Definition at line 56 of file ListController.php.

doExecute (   $method = null)
protected
See also
Controller::doExecute()

Definition at line 94 of file ListController.php.

getObjects (   $type,
  $queryCondition,
  $sortArray,
  $pagingInfo 
)
protected

Get the object to display.

The default implementation uses a StringQuery instance for the object retrieval. Subclasses may override this. If filter is an empty string, all nodes of the given type will be selected.

Parameters
$typeThe object type
$queryConditionThe query condition passed from the view (to be used with StringQuery).
$sortArrayAn array of attributes to order by (with an optional ASC|DESC appended)
$pagingInfoThe current PagingInfo instance
Returns
Array of Node instances

Definition at line 160 of file ListController.php.

modifyModel ( $nodes)
protected

Modify the model passed to the view.

Note
subclasses will override this to implement special application requirements.
Parameters
$nodesA reference to the array of Node instances passed to the view

Definition at line 189 of file ListController.php.