MenuItem Class Reference

Inheritance diagram for MenuItem:

Inheritance graph
[legend]
List of all members.

Detailed Description

Definition at line 26 of file class.MenuItem.php.

Public Member Functions

 MenuItem ($id=UNDEFINED, $caption='menu item', $link=UNDEFINED)
 add_child ($child)
 nr_children ()
 has_children ()
 level ()
 ToDo: fix it, it doesn't seem to work well.
 to_xml ($indent)
 returns the menu element as an xml string indented by $indent
 children_to_xml ($indent)
 returns the menu element as an xml string indented by $indent
 to_text ($indent)
 returns the element and all its subelements in an easily readable text format
 to_js_arr ($indent)
 Returns a JS array containing the items of the menu in the format required by TigraMenu.

Public Attributes

 $id
 $caption
 $link
 $parent
 $children


Constructor & Destructor Documentation

MenuItem::MenuItem id = UNDEFINED,
caption = 'menu item',
link = UNDEFINED
 

Definition at line 34 of file class.MenuItem.php.

References $caption, $id, and $link.

Referenced by MenuRoot::MenuRoot().


Member Function Documentation

MenuItem::add_child child  ) 
 

Definition at line 44 of file class.MenuItem.php.

MenuItem::nr_children  ) 
 

Definition at line 50 of file class.MenuItem.php.

Referenced by children_to_xml(), has_children(), MenuRoot::to_js(), to_js_arr(), and to_text().

MenuItem::has_children  ) 
 

Definition at line 55 of file class.MenuItem.php.

References nr_children().

MenuItem::level  ) 
 

ToDo: fix it, it doesn't seem to work well.

Definition at line 64 of file class.MenuItem.php.

MenuItem::to_xml indent  ) 
 

returns the menu element as an xml string indented by $indent

Definition at line 80 of file class.MenuItem.php.

MenuItem::children_to_xml indent  ) 
 

returns the menu element as an xml string indented by $indent

Definition at line 103 of file class.MenuItem.php.

References nr_children().

Referenced by MenuRoot::to_xml().

MenuItem::to_text indent  ) 
 

returns the element and all its subelements in an easily readable text format

Definition at line 117 of file class.MenuItem.php.

References nr_children().

MenuItem::to_js_arr indent  ) 
 

Returns a JS array containing the items of the menu in the format required by TigraMenu.

Definition at line 139 of file class.MenuItem.php.

References $caption, $link, and nr_children().


Member Data Documentation

MenuItem::$id
 

Definition at line 28 of file class.MenuItem.php.

Referenced by MenuItem().

MenuItem::$caption
 

Definition at line 29 of file class.MenuItem.php.

Referenced by MenuItem(), and to_js_arr().

MenuItem::$link
 

Definition at line 30 of file class.MenuItem.php.

Referenced by MenuItem(), and to_js_arr().

MenuItem::$parent
 

Definition at line 31 of file class.MenuItem.php.

MenuItem::$children
 

Definition at line 32 of file class.MenuItem.php.


Generated on Fri Jan 20 10:35:04 2006 for HGSM by  doxygen 1.4.5