46 $request->setValue('completeObjects', true);
47 parent::initialize($request, $response);
61 protected function getObjects($type, $queryCondition, $sortArray, $pagingInfo) {
66 $requiredAttributes = ['created', 'creator', 'modified', 'last_editor'];
68 foreach ($persistenceFacade->getKnownTypes() as $type) {
69 $mapper = $persistenceFacade->getMapper($type);
71 foreach ($requiredAttributes as $attribute) {
72 if (!$mapper->hasAttribute($attribute)) {
85 null, ['modified DESC'], $pagingInfo);
88 foreach($historyItems as $historyItem) {
90 $objects[] = $historyItem;
93 $pagingInfo->setTotalCount(sizeof($objects));
101 parent::modifyModel($nodes);
105 for ($i=0, $count=sizeof($nodes); $i<$count; $i++) {
106 $curNode = $nodes[$i];
107 $curNode->setValue('_displayValue', $curNode->getDisplayValue(), true);
108 $curNode->setValue('_type', $persistenceFacade->getSimpleType($curNode->getType()), true);
113 if ($request->hasValue('sortFieldName')) {
114 $sortDir = $request->hasValue('sortDirection') ? $request->getValue('sortDirection') : 'asc';
116 $request->getValue('sortFieldName') => $sortDir == 'asc' ?
120 usort($nodes, [$comparator, 'compare']);
Response holds the response values that are used as output from Controller instances.
Request holds the request values that are used as input to Controller instances.
HistoryController returns a list of last changed entity instances.
getPermissionManager()
Get the PermissionManager instance.
BuildDepth values are used to define the depth when loading object trees.
ListController is used to load Node lists.
getPersistenceFacade()
Get the PersistenceFacade instance.
setValue($name, $value)
Set a value.
getRequest()
Get the Request instance.
initialize(Request $request, Response $response)
getObjects($type, $queryCondition, $sortArray, $pagingInfo)
PersistenceAction values are used to define actions on PersistentObject instances.
ObjectComparator is used to compare persistent objects by given criterias.