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

Class: HTML_TreeNode

Source Location: /HTML_TreeMenu-1.2.2/HTML/TreeMenu.php

Class Overview


HTML_TreeNode class


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 348]
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 378]

The css class for this node
  • Access: public

Type:   string


[ Top ]

$ensureVisible =

[line 413]

Should this node be made visible?
  • Access: public

Type:   bool


[ Top ]

$events =

[line 425]

Javascript event handlers;
  • Access: public

Type:   array


[ Top ]

$expanded =

[line 401]

Whether this node is expanded or not
  • Access: public

Type:   bool


[ Top ]

$expandedIcon =

[line 373]

The icon to show when expanded for this node.
  • Access: public

Type:   string


[ Top ]

$icon =

[line 368]

The icon for this node.
  • Access: public

Type:   string


[ Top ]

$isDynamic =

[line 407]

Whether this node is dynamic or not
  • Access: public

Type:   bool


[ Top ]

$items =

[line 395]

Indexed array of subnodes
  • Access: public

Type:   array


[ Top ]

$link =

[line 363]

The link for this node.
  • Access: public

Type:   string


[ Top ]

$linkTarget =

[line 383]

The link target for this node
  • Access: public

Type:   string


[ Top ]

$parent =

[line 419]

The parent node. Null if top level
  • Access: public

Type:   HTML_TreeNode


[ Top ]

$text =

[line 358]

The text for this node.
  • Access: public

Type:   string


[ Top ]



Method Detail

HTML_TreeNode (Constructor)   [line 472]

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:
                         o text          The title of the node,
                                         defaults to blank
                         o link          The link for the node,
                                         defaults to blank
                         o icon          The icon for the node,
                                         defaults to blank
                         o expandedIcon  The icon to show when the node
                                         is expanded
                         o cssClass      The CSS class for this node,
                                         defaults to blank
                         o expanded      The default expanded status of
                                         this node, defaults to false
                                         This doesn't affect non dynamic
                                         presentation types
                         o linkTarget    Target for the links.
                                         Defaults to linkTarget of the
                                         HTML_TreeMenu_Presentation.
                         o isDynamic     If this node is dynamic or not.
                                         Only affects certain
                                         presentation types.
                         o 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 527]

int &addItem( HTML_TreeNode &$node)

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

Parameters:

HTML_TreeNode   &$node   —  The new node

[ Top ]

setOption   [line 514]

void setOption( string $option, string $value)

Allows setting of various parameters after the initial constructor call

Possible options you can set are:

  o text
  o link
  o icon
  o cssClass
  o expanded
  o isDynamic
  o ensureVisible

NOTE: The same options as in HTML_TreeNode()

  • Access: public

Parameters:

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

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:40:32 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.