TreeController Class Reference

Detailed Description

TreeController is used to visualize nodes in a tree view.

The controller supports the following actions:

Action default
Load the cild nodes of the given Node.

Parameter Description
in oid The object id of the parent Node whose children should be loaded (optional)
in sort The attribute to sort the children by (optional)
in rootTypes Name of a configuration value in configuration section 'application', that defines an array of root types of the tree (optional, defaults to 'rootTypes')
out list An array of associative arrays with keys 'oid', 'displayText', 'isFolder', 'hasChildren'
Response Actions
ok In all cases
Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 42 of file TreeController.php.

+ Inheritance diagram for TreeController:

Protected Member Functions

 doExecute ($method=null)
 
 getChildren ($oid)
 
 getRootOIDs ()
 
 getViewNode (Node $node, $displayText='')
 
 isVisible (Node $node)
 
 getDisplayText (Node $node)
 
 getRootTypes ()
 
 isRootTypeNode (ObjectId $oid)
 
- Protected Member Functions inherited from Controller
 validate ()
 
 doExecute ($method=null)
 
 executeSubAction ($action)
 
 redirect ($location, $key=null, $data=null)
 
 getLogger ()
 
 getSession ()
 
 getPersistenceFacade ()
 
 getPermissionManager ()
 
 getActionMapper ()
 
 getLocalization ()
 
 getMessage ()
 
 getConfiguration ()
 
 requireTransaction ()
 
 endTransaction ($commit)
 
 isLocalizedRequest ()
 
 checkLanguageParameter ()
 
 generateCsrfToken ($name)
 
 validateCsrfToken ($name)
 
 getLocalSessionValue ($key, $default=null)
 
 setLocalSessionValue ($key, $value)
 
 clearLocalSessionValues ()
 

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 ()
 
- Public Attributes inherited from Controller
const CSRF_TOKEN_PARAM = 'csrf_token'
 

Member Function Documentation

doExecute (   $method = null)
protected
See also
Controller::doExecute()

Definition at line 47 of file TreeController.php.

getChildren (   $oid)
protected

Get the children for a given oid.

Parameters
$oidThe object id
Returns
Array of Node instances.

Definition at line 88 of file TreeController.php.

getRootOIDs ( )
protected

Get the oids of the root nodes.

Returns
An array of object ids.

Definition at line 128 of file TreeController.php.

getViewNode ( Node  $node,
  $displayText = '' 
)
protected

Get the view of a Node.

Parameters
$nodeThe Node to create the view for
$displayTextThe text to display (will be taken from TreeController::getDisplayText() if not specified) (default: '')
Returns
An associative array whose keys correspond to Ext.tree.TreeNode config parameters

Definition at line 139 of file TreeController.php.

isVisible ( Node  $node)
protected

Test if a Node should be displayed in the tree.

Parameters
$nodeNode to display
Returns
Boolean

Definition at line 162 of file TreeController.php.

getDisplayText ( Node  $node)
protected

Get the display text for a Node.

Parameters
$nodeNode to display
Returns
The display text.

Definition at line 171 of file TreeController.php.

getRootTypes ( )
protected

Get all root types.

Returns
Array of Node instances

Definition at line 185 of file TreeController.php.

isRootTypeNode ( ObjectId  $oid)
protected

Check if the given oid belongs to a root type node.

Parameters
$oidThe object id
Returns
Boolean

Definition at line 222 of file TreeController.php.