Detailed Description
SortController is used to change the order of nodes.
Nodes can either be sorted in a list of nodes of the same type (moveBefore action) or in a list of child nodes of a container node (insertBefore action).
The controller supports the following actions:
Parameter | Description |
---|---|
in insertOid | The object id of the object to insert/move |
in referenceOid | The object id of the object to insert the inserted object before. If the inserted object should be the last in the container order, the referenceOid contains the special value ORDER_BOTTOM |
Response Actions | |
ok | In all cases |
Parameter | Description |
---|---|
in containerOid | The oid of the container object |
in insertOid | The oid of the object to insert/move |
in referenceOid | The object id of the object to insert the inserted object before. If the inserted object should be the last in the container order, the referenceOid contains the special value ORDER_BOTTOM |
in role | The role, that the inserted object should have in the container object. |
Response Actions | |
ok | In all cases |
Definition at line 58 of file SortController.php.
Public Attributes | |
const | ORDER_BOTTOM = 'ORDER_BOTTOM' |
const | UNBOUND = 'UNBOUND' |
Protected Member Functions | |
validate () | |
doExecute () | |
doMoveBefore () | |
doInsertBefore () | |
loadObjectsInSortkeyRange ($type, $sortkeyName, $lowerValue, $upperValue) | |
checkObjects ($objectMap) | |
isOrderBotton ($request) | |
getSortkeyValue ($object, $valueName) | |
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 66 of file SortController.php.
|
protected |
- See also
- Controller::doExecute()
Definition at line 133 of file SortController.php.
|
protected |
Execute the moveBefore action.
Definition at line 154 of file SortController.php.
|
protected |
Execute the insertBefore action.
Definition at line 223 of file SortController.php.
|
protected |
Load all objects between two sortkey values.
- Parameters
-
$type The type of objects $sortkeyName The name of the sortkey attribute $lowerValue The lower value of the sortkey or UNBOUND $upperValue The upper value of the sortkey or UNBOUND
Definition at line 273 of file SortController.php.
|
protected |
Check if all objects in the given array are not null and add an OID_INVALID error to the response, if at least one is.
- Parameters
-
$objectMap An associative array with the controller parameter names as keys and the objects to check as values
- Returns
- Boolean
Definition at line 294 of file SortController.php.
|
protected |
Check if the node should be moved to the bottom of the list.
- Parameters
-
$request The request
- Returns
- Boolean
Definition at line 315 of file SortController.php.
|
protected |
Get the sortkey value of an object.
Defaults to the object's id, if the value is null
- Parameters
-
$object The object $valueName The name of the sortkey attribute
- Returns
- String
Definition at line 326 of file SortController.php.
Member Data Documentation
const ORDER_BOTTOM = 'ORDER_BOTTOM' |
Definition at line 60 of file SortController.php.
const UNBOUND = 'UNBOUND' |
Definition at line 61 of file SortController.php.