wCMF  3.6
 All Classes Namespaces Files Functions Variables Groups Pages
AsyncPagingController Class Reference
+ Inheritance diagram for AsyncPagingController:

Public Member Functions

 hasView ()
 
 executeKernel ()
 
 getObjects ($type, $filter, $sortArray, &$pagingInfo)
 
 getOIDs ($type, $filter, $sortArray, &$pagingInfo)
 
 getSortingProperties ()
 
 modifyModel (&$nodes)
 
 sortByRealSubject ($a, $b)
 
- Public Member Functions inherited from Controller
 Controller (&$delegate)
 
 initialize (&$request, &$response)
 
 validate ()
 
 hasView ()
 
 execute ()
 
 executeKernel ()
 
 getErrorMsg ()
 
 setErrorMsg ($msg)
 
 appendErrorMsg ($msg)
 
getRequest ()
 
getResponse ()
 
getView ()
 
getDelegate ()
 
 getViewTemplate ($controller, $context, $action)
 
 getCacheId ()
 
 assignViewDefaults (&$view)
 
 isLocalizedRequest ()
 

Public Attributes

 $_sortProperties = null
 
- Public Attributes inherited from Controller
 $_request = null
 
 $_response = null
 
 $_errorMsg = ''
 
 $_view = null
 
 $_delegate = null
 

Detailed Description

AsyncPagingController is a controller that allows to navigate lists.

wCMF - wemove Content Management Framework Copyright (C) 2005-2014 wemove digital solutions GmbH

Licensed under the terms of any of the following licenses at your choice:

See the license.txt file distributed with this work for additional information.

Id:
class.AsyncPagingController.php 1462 2014-02-04 23:52:27Z iherwig

Input actions:

  • unspecified: List nodes

Output actions:

  • ok In any case
Parameters
[in]typeThe entity type to list
[in]filterA query passed to ObjectQuery::executeString()
[in]limitThe page size of the used PagingInfo
[in]startThe start index used to initialize the used PagingInfo
[in]sortThe attribute to order the entities by
[in]dirThe direction to use to order (ASC|DESC)
[in]poidThe parent object id of the entities if any (this is used to set relation information on the result)
[in]renderValuesTrue/False wether to render the values using NodeUtil::renderValues or not (optional, default: false)
[in]completeObjectsTrue/False wether to return all object attributes objects or only the display values using NodeUtil::removeNonDisplayValues (optional, default: false)
[out]totalCountThe total number of all entities that match the criteria
[out]objectsAn array of entities of the specified type Additional properties are 'realSubject', 'realSubjectType' and 'composition' for many-to-many entities and 'clientOID'
Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 54 of file class.AsyncPagingController.php.

Member Function Documentation

AsyncPagingController::hasView ( )
See Also
Controller::hasView()

Definition at line 61 of file class.AsyncPagingController.php.

AsyncPagingController::executeKernel ( )

Do processing and assign Node data to View.

Returns
False in every case.
See Also
Controller::executeKernel()

Definition at line 70 of file class.AsyncPagingController.php.

References ACTION_READ, RightsManager\getInstance(), Localization\getInstance(), getObjects(), getSortingProperties(), Controller\isLocalizedRequest(), modifyModel(), PagingInfo\setIndex(), and Obfuscator\unveil().

+ Here is the call graph for this function:

AsyncPagingController::getObjects (   $type,
  $filter,
  $sortArray,
$pagingInfo 
)

Get the object to display. The default implementation uses ObjectQuery::executeString 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
filterThe filter query passed from the view (a serialized ObjectQuery).
sortArrayAn array of attributes to order by (with an optional ASC|DESC appended)
pagingInfoA reference to the current paging information (Paginginfo instance)
Returns
An array of object instances

Definition at line 146 of file class.AsyncPagingController.php.

References BUILDDEPTH_SINGLE, ObjectQuery\executeString(), NodeUtil\getNodeQuery(), getSortingProperties(), and PersistenceFacade\isKnownType().

Referenced by executeKernel().

+ Here is the call graph for this function:

AsyncPagingController::getOIDs (   $type,
  $filter,
  $sortArray,
$pagingInfo 
)
Deprecated:

Definition at line 167 of file class.AsyncPagingController.php.

References WCMFException\throwEx().

+ Here is the call graph for this function:

AsyncPagingController::getSortingProperties ( )

Get the sorting properties from the 'sort', 'dir' request parameters. The type is guessed from the sort parameter (if it has the form type.attribute or the attribute belongs to the type given in the 'type' request parameter)

Returns
Associative array with keys 'type', 'attribute', 'direction'

Definition at line 177 of file class.AsyncPagingController.php.

References $_sortProperties, and PersistenceFacade\getInstance().

Referenced by executeKernel(), getObjects(), modifyModel(), and sortByRealSubject().

+ Here is the call graph for this function:

AsyncPagingController::modifyModel ( $nodes)

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 references passed to the view

Definition at line 210 of file class.AsyncPagingController.php.

References BUILDDEPTH_SINGLE, PersistenceFacade\getInstance(), PersistenceFacade\getOIDParameter(), NodeUtil\getRealSubjectType(), getSortingProperties(), PersistenceFacade\isValidOID(), NodeUtil\removeNonDisplayValues(), NodeUtil\renderValues(), NodeUtil\setSortProperties(), and Node\sort().

Referenced by executeKernel().

+ Here is the call graph for this function:

AsyncPagingController::sortByRealSubject (   $a,
  $b 
)

Definition at line 315 of file class.AsyncPagingController.php.

References DATATYPE_ATTRIBUTE, and getSortingProperties().

+ Here is the call graph for this function:

Member Data Documentation

AsyncPagingController::$_sortProperties = null

Definition at line 56 of file class.AsyncPagingController.php.

Referenced by getSortingProperties().


The documentation for this class was generated from the following file: