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 43 of file TreeController.php.

+ Inheritance diagram for TreeController:

Protected Member Functions

 doExecute ()
 
 getChildren ($oid)
 
 getRootOIDs ()
 
 getViewNode (Node $node, $displayText='')
 
 isVisible (Node $node)
 
 getDisplayText (Node $node)
 
 getRootTypes ()
 
 isRootTypeNode (ObjectId $oid)
 
- 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

doExecute ( )
protected
See also
Controller::doExecute()

Definition at line 48 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 89 of file TreeController.php.

getRootOIDs ( )
protected

Get the oids of the root nodes.

Returns
An array of object ids.

Definition at line 130 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 141 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 164 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 173 of file TreeController.php.

getRootTypes ( )
protected

Get all root types.

Returns
Array of Node instances

Definition at line 187 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 224 of file TreeController.php.