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

Class: HTML_TreeMenu_DHTML

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

Class Overview

HTML_TreeMenu_Presentation
   |
   --HTML_TreeMenu_DHTML

HTML_TreeMenu_DHTML class


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods

Class: HTML_TreeMenu_Presentation

HTML_TreeMenu_Presentation::HTML_TreeMenu_Presentation()
Base constructor simply sets the menu object
HTML_TreeMenu_Presentation::printMenu()
Prints the HTML generated by the toHTML() method.

Class Details

[line 630]
HTML_TreeMenu_DHTML class

This class is a presentation class for the tree structure created using the TreeMenu/TreeNode. It presents the traditional tree, static for browsers that can't handle the DHTML.



[ Top ]


Class Variables

$defaultClass =

[line 667]

The default CSS class for the nodes
  • Access: public

Type:   string


[ Top ]

$images =

[line 649]

Path to the images
  • Access: public

Type:   string


[ Top ]

$isDynamic =

[line 643]

Dynamic status of the treemenu.

If true (default) this has no effect. If false it will override all dynamic status vars and set the menu to be fully expanded an non-dynamic.

  • Access: public

Type:   bool


[ Top ]

$jsObjectName =

[line 679]

Name of Jabbascript object to use
  • Access: public

Type:   string


[ Top ]

$linkTarget =

[line 655]

Target for the links generated
  • Access: public

Type:   string


[ Top ]

$noTopLevelImages =

[line 673]

Whether to skip first level branch images
  • Access: public

Type:   bool


[ Top ]

$usePersistence =

[line 661]

Whether to use clientside persistence or not
  • Access: public

Type:   bool


[ Top ]



Method Detail

HTML_TreeMenu_DHTML (Constructor)   [line 718]

HTML_TreeMenu_DHTML HTML_TreeMenu_DHTML( HTML_TreeMenu &$structure, [array $options = array()], [bool $isDynamic = true])

Constructor

Takes the tree structure as an argument and an array of options which can consist of:

  o images            -  The path to the images folder.
                         Defaults to "images"
  o linkTarget        -  The target for the link.
                         Defaults to "_self"
  o defaultClass      -  The default CSS class to apply to a node.
                         Default is none.
  o usePersistence    -  Whether to use clientside persistence. This
                         persistence is achieved using cookies.
                         Default is true.
  o noTopLevelImages  -  Whether to skip displaying the first level of
                         images if there is multiple top level branches.
  o maxDepth          -  The maximum depth of indentation. Useful for
                         ensuring deeply nested trees don't go way off to
                         the right of your page etc.
                         Defaults to no limit.
  o jsObjectName      -  Name to use for jabbascript object. Set this if
                         you have different menus that should maintain
                         their persistence information separately.

And also a boolean for whether the entire tree is dynamic or not. This overrides any perNode dynamic settings.

  • Access: public

Parameters:

HTML_TreeMenu   &$structure   —  The menu structure
array   $options   —  Array of options
bool   $isDynamic   —  Whether the tree is dynamic or not

[ Top ]

toHTML   [line 747]

string toHTML( )

Returns the HTML for the menu.

This method can be used instead of HTML_TreeMenu_Presentation::printMenu() to use the menu system with a template system.

  • Return: The HTML for the menu
  • Access: public

[ Top ]


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