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

Class: HTML_TreeNode

Source Location: /PhpDocumentor-1.2.0beta2/HTML_TreeMenu-1.1.2/TreeMenu.php

Class Overview


HTML_TreeNode class


Author(s):

Variables

Methods


Child classes:

DirNode
HTML_TreeNode class

Inherited Variables

Inherited Methods


Class Details

[line 110]
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.



[ Top ]


Class Variables

$cssClass =

[line 134]

The css class for this node

Type:   string


[ Top ]

$ensureVisible =

[line 158]

Should this node be made visible?

Type:   bool


[ Top ]

$events =

[line 170]

Javascript event handlers;

Type:   array


[ Top ]

$expanded =

[line 146]

Whether this node is expanded or not

Type:   bool


[ Top ]

$icon =

[line 128]

The icon for this node.

Type:   string


[ Top ]

$isDynamic =

[line 152]

Whether this node is dynamic or not

Type:   bool


[ Top ]

$items =

[line 140]

Indexed array of subnodes

Type:   array


[ Top ]

$link =

[line 122]

The link for this node.

Type:   string


[ Top ]

$parent =

[line 164]

The parent node. Null if top level

Type:   object


[ Top ]

$text =

[line 116]

The text for this node.

Type:   string


[ Top ]



Method Detail

HTML_TreeNode (Constructor)   [line 194]

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

Constructor
  • 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   [line 239]

void &addItem( object &$node)

Adds a new subnode to this node.
  • Access: public

Parameters:

object   $node     The new node

[ Top ]

setOption   [line 228]

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

  • Access: public

Parameters:

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

[ Top ]


Documentation generated on Fri, 30 Apr 2004 22:10:44 +0200 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.