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 to be used with StringQuery::setConditionString() |
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: true) |
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 |
Definition at line 52 of file ListController.php.
Inheritance diagram for ListController:
Protected Member Functions | |
validate () | |
doExecute () | |
getObjects ($type, $queryCondition, $sortArray, $pagingInfo) | |
modifyModel ($nodes) | |
Protected Member Functions inherited from Controller | |
validate () | |
executeSubAction ($action) | |
getLogger () | |
getSession () | |
getPersistenceFacade () | |
getPermissionManager () | |
getActionMapper () | |
getLocalization () | |
getMessage () | |
getConfiguration () | |
assignResponseDefaults () | |
isLocalizedRequest () | |
checkLanguageParameter () | |
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 () | |
Member Function Documentation
|
protected |
- See also
- Controller::validate()
Definition at line 57 of file ListController.php.
|
protected |
- See also
- Controller::doExecute()
Definition at line 80 of file ListController.php.
|
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
-
$type The object type $queryCondition The query condition passed from the view (to be used with StringQuery). $sortArray An array of attributes to order by (with an optional ASC|DESC appended) $pagingInfo A reference to the current paging information (PagingInfo instance)
- Returns
- Array of Node instances
Definition at line 156 of file ListController.php.
|
protected |
Modify the model passed to the view.
- Note
- subclasses will override this to implement special application requirements.
- Parameters
-
$nodes A reference to the array of node references passed to the view
Definition at line 193 of file ListController.php.