Child classes:
- DirNode
- Directory Node
Inherited Variables
Inherited Constants
Inherited Methods
Class Details
HTML_TreeNode class
This class is supplementary to the above and provides a way to add nodes to the tree. A node can have other nodes added to it.
Tags:
- author - Harald Radi <harald.radi@nme.at>
- author - Richard Heyes <richard@php.net>
- access - public
[ Top ]
Class Variables
$cssClass
[line 137]
The css class for this node
Type: string
Overrides:
[ Top ]
$ensureVisible
[line 161]
Should this node be made visible?
Type: bool
Overrides:
[ Top ]
$events
[line 173]
Javascript event handlers;
Type: array
Overrides:
[ Top ]
$expanded
[line 149]
Whether this node is expanded or not
Type: bool
Overrides:
[ Top ]
$icon
[line 131]
The icon for this node.
Type: string
Overrides:
[ Top ]
$isDynamic
[line 155]
Whether this node is dynamic or not
Type: bool
Overrides:
[ Top ]
$items
[line 143]
Indexed array of subnodes
Type: array
Overrides:
[ Top ]
$link
[line 125]
The link for this node.
Type: string
Overrides:
[ Top ]
$parent
[line 167]
The parent node. Null if top level
Type: object
Overrides:
[ Top ]
$text
[line 119]
The text for this node.
Type: string
Overrides:
[ Top ]
Class Methods
HTML_TreeNode
HTML_TreeNode HTML_TreeNode(
[array
$options = array()], [array
$events = array()])
[line 197]
Constructor
Tags:
- access - public
Parameters:
-
array
$options
-
An array of options which you can pass to change the way this node looks/acts. This can consist of:
- text The title of the node, defaults to blank
- link The link for the node, defaults to blank
- icon The icon for the node, defaults to blank
- class The CSS class for this node, defaults to blank
- expanded The default expanded status of this node, defaults to false This doesn't affect non dynamic presentation types
- isDynamic If this node is dynamic or not. Only affects certain presentation types.
- ensureVisible If true this node will be made visible despite the expanded settings, and client side persistence. Will not affect some presentation styles, such as Listbox. Default is false
- array $events - An array of javascript events and the corresponding event handlers. Additionally to the standard javascript events you can specify handlers for the 'onexpand', 'oncollapse' and 'ontoggle' events which will be fired whenever a node is collapsed and/or expanded.
[ Top ]
addItem
void &addItem(
&$node, object
$node)
[line 242]
Adds a new subnode to this node.
Tags:
- access - public
Parameters:
- object $node - The new node
- &$node -
[ Top ]
setOption
void setOption(
string
$option, string
$value)
[line 231]
Allows setting of various parameters after the initial
constructor call. Possible options you can set are:
- text
- link
- icon
- cssClass
- expanded
- isDynamic
- ensureVisible
Tags:
- access - public
Parameters:
- string $option - Option to set
- string $value - Value to set the option to
[ Top ]