![]() |
Framework
3.9
|
TreeNode represents a node in the tree. More...
Public Member Functions | |
TreeNode ($id, $title, $value="", $checked=false, $closedStyle="tree_node_closed", $openStyle="tree_node_open", $link=null, $target="") | |
Create a new TreeNode. More... | |
writeHTML () | |
Write the node out as HTML to the output buffer. More... | |
add ($n) | |
Add a child TreeNode (or an array of children) More... | |
calculateOpenState () | |
Recursively determine whether the branch of the tree of which this node is the root should be displayed as open, based on the selection state of the node and its children. More... | |
selectByValue ($value) | |
Public Attributes | |
$children = array() | |
$id | |
$title | |
$value | |
$checked | |
$closedStyle | |
$openStyle | |
$leafStyle | |
$open | |
$link | |
$onDemand | |
$disabled | |
$target | |
$extras | |
Extra data/controls to be shown with this tree node. More... | |
TreeNode represents a node in the tree.
Both leaf and branch nodes are represented using instances of this class. If a node is to be a branch, child TreeNodes can be added via the add() method.
TreeNode::add | ( | $n | ) |
Add a child TreeNode (or an array of children)
mixed | $n | the child or children to add |
TreeNode::calculateOpenState | ( | ) |
Recursively determine whether the branch of the tree of which this node is the root should be displayed as open, based on the selection state of the node and its children.
Definition at line 271 of file tree.inc.
TreeNode::TreeNode | ( | $id, | |
$title, | |||
$value = "" , |
|||
$checked = false , |
|||
$closedStyle = "tree_node_closed" , |
|||
$openStyle = "tree_node_open" , |
|||
$link = null , |
|||
$target = "" |
|||
) |
Create a new TreeNode.
string | $id | the ID for this node |
string | $title | the Title text for this node |
string | $value | the value for this node. If non-empty, a checkbox is generated when the node is displayed. |
boolean | $checked | flag indicating whether the node should display as selected |
string | $closedStyle | CSS class to use when the node is closed. |
string | $openStyle | CSS class to use when the node is open. |
string | $link | optional hyperlink URL for the node. |
string | $target | optional target to load the URL. |
Definition at line 91 of file tree.inc.
TreeNode::writeHTML | ( | ) |
Write the node out as HTML to the output buffer.
This method recursively descends into all child nodes.
Definition at line 112 of file tree.inc.
TreeNode::$extras |