HTML_TreeMenu
[ class tree: HTML_TreeMenu ] [ index: HTML_TreeMenu ] [ all elements ]

Class: HTML_TreeNode

Source Location: /HTML_TreeMenu-1.1.2/TreeMenu.php

Class Overview


HTML_TreeNode class


Author(s):

Variables

Methods


Child classes:

DirNode
Directory Node

Class Details

[line 113]
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


[ Top ]

$ensureVisible =

[line 161]

Should this node be made visible?


Type:  bool


[ Top ]

$events =

[line 173]

Javascript event handlers;


Type:  array


[ Top ]

$expanded =

[line 149]

Whether this node is expanded or not


Type:  bool


[ Top ]

$icon =

[line 131]

The icon for this node.


Type:  string


[ Top ]

$isDynamic =

[line 155]

Whether this node is dynamic or not


Type:  bool


[ Top ]

$items =

[line 143]

Indexed array of subnodes


Type:  array


[ Top ]

$link =

[line 125]

The link for this node.


Type:  string


[ Top ]

$parent =

[line 167]

The parent node. Null if top level


Type:  object


[ Top ]

$text =

[line 119]

The text for this node.


Type:  string


[ Top ]



Class Methods


constructor HTML_TreeNode [line 197]

HTML_TreeNode HTML_TreeNode( [array $options = array()], [array $events = array()])

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 ]

method addItem [line 242]

void &addItem( &$node, object $node)

Adds a new subnode to this node.



Tags:

access:  public


Parameters:

object  $node  The new node
  &$node 

[ Top ]

method setOption [line 231]

void setOption( string $option, string $value)

Allows setting of various parameters after the initial

constructor call. Possible options you can set are:

  • text
  • link
  • icon
  • cssClass
  • expanded
  • isDynamic
  • ensureVisible
ie The same options as in the constructor




Tags:

access:  public


Parameters:

string  $option  Option to set
string  $value  Value to set the option to

[ Top ]

    Поддержать сайт на родительском проекте КГБ