51 private $search = null;
72 parent::__construct($session, $persistenceFacade, $permissionManager,
73 $actionMapper, $localization, $message, $configuration);
74 $this->search = $search;
88 protected function getObjects($type, $queryCondition, $sortArray, $pagingInfo) {
92 $this->hits = $this->search->find($queryCondition, $pagingInfo);
95 foreach ($this->hits as $hit) {
102 foreach($oids as $oid) {
104 $obj = $persistenceFacade->load($oid);
115 parent::modifyModel($nodes);
119 for ($i=0, $count=sizeof($nodes); $i<$count; $i++) {
120 $curNode = $nodes[$i];
121 $hit = $this->hits[$curNode->getOID()->__toString()];
122 $curNode->setValue('_displayValue', $curNode->getDisplayValue(), true);
123 $curNode->setValue('_summary', "... ".$hit['summary']." ...", true);
124 $curNode->setValue('_type', $persistenceFacade->getSimpleType($curNode->getType()), true);
129 if ($request->hasValue('sortFieldName')) {
130 $sortDir = $request->hasValue('sortDirection') ? $request->getValue('sortDirection') : 'asc';
132 $request->getValue('sortFieldName') => $sortDir == 'asc' ?
136 usort($nodes, [$comparator, 'compare']);
Session is the interface for session implementations and defines access to session variables.
Search implementations are used to search entity objects.
getObjects($type, $queryCondition, $sortArray, $pagingInfo)
ObjectId is the unique identifier of an object.
getPermissionManager()
Get the PermissionManager instance.
Implementations of Configuration give access to the application configuration.
ListController is used to load Node lists.
static parse($oid)
Parse a serialized object id string into an ObjectId instance.
PersistenceFacade defines the interface for PersistenceFacade implementations.
getPersistenceFacade()
Get the PersistenceFacade instance.
SearchController executes a search and returns matching objects in a paged list.
getRequest()
Get the Request instance.
ActionMapper implementations are responsible for instantiating and executing Controllers based on the...
PermissionManager implementations are used to handle all authorization requests.
PersistenceAction values are used to define actions on PersistentObject instances.
__construct(Session $session, PersistenceFacade $persistenceFacade, PermissionManager $permissionManager, ActionMapper $actionMapper, Localization $localization, Message $message, Configuration $configuration, Search $search)
Constructor.
Localization defines the interface for storing localized entity instances and retrieving them back.
ObjectComparator is used to compare persistent objects by given criterias.
Message is used to get localized messages to be used in the user interface.