Main Page   Compound List   File List   Compound Members   File Members  

Menu Class Reference

class to manage menu More...

List of all members.

Public Methods

 Menu ($name="Menu",$attrib='',$type="menu")
 constructor

 set_type ($type)
 to set type of menu

 add ($menu,$position='')
 add a menu object into another menu object as submenu

 rm ($position)
 remove a submenu object from this menu

 print_section ($position='',$print_selected,$indent=0)
 return html code of submenu

 print_menu ($position='',$print_all=0,$print_selected=1,$indent_px=0,$header=1)
 return menu html code


Public Attributes

 type
 name
 sub_menu
 attrib
 position


Detailed Description

class to manage menu

To create an html menu table

Parameters:
type=  'menu' css class
name  name of menu section
sub_menu  array of class Menu
attrib  associative array of attributs of this section, these are inserted in <a> tag as key="value" as its attributes
position  array of actual position

Definition at line 624 of file html.php.


Constructor & Destructor Documentation

Menu::Menu   name = "Menu",
  attrib = '',
  type = "menu"
 

constructor

Parameters:
name=  "Menu" name of the section
attrib=  "" array of attributes for this section
type=  'default' not used

Definition at line 636 of file html.php.

References attrib, name, and type.


Member Function Documentation

Menu::add   menu,
  position = ''
 

add a menu object into another menu object as submenu

Parameters:
menu  submenu
position=  '' array of name of subsections in which insert submenu: if you have to add in root level, you must to set to '' or void array, if you have to add in subsection 'Level1' of subsection 'Level0' of root menu, $position=array('Level0','Level1')

Definition at line 661 of file html.php.

References position, and sub_menu.

Menu::print_menu   position = '',
  print_all = 0,
  print_selected = 1,
  indent_px = 0,
  header = 1
 

return menu html code

Parameters:
position=  '' array of name of subsections in which you are: if you are in root level, you must to set to '' or void array, if you are in subsection 'Level1' of subsection 'Level0' of root menu, $position=array('Level0','Level1')
print_all=0  if print all menu tree or only the "ramo" of $position
print_selected=1  if print selected submenu
indent=0  pixel to indent submenus
header=1  if print <div> and tags

Definition at line 731 of file html.php.

References name, position, print_section(), sub_menu, and type.

Menu::print_section   position = '',
  print_selected,
  indent = 0
 

return html code of submenu

Parameters:
position=  '' name of current submenu
print_selected=1  if print selected submenu
indent=0  pixel to indent section

Definition at line 692 of file html.php.

References attrib, position, and sub_menu.

Referenced by print_menu().

Menu::rm   position
 

remove a submenu object from this menu

Parameters:
position=  '' path of menu to remove: if you have to remove subsection 'Level1' in subsection 'Level0' of root menu, $position=array('Level0','Level1')

Definition at line 676 of file html.php.

References position, and sub_menu.

Menu::set_type   type
 

to set type of menu

Parameters:
type  type of menu

Definition at line 645 of file html.php.

References sub_menu, and type.


Member Data Documentation

Menu::attrib
 

Definition at line 628 of file html.php.

Referenced by Menu(), and print_section().

Menu::name
 

Definition at line 626 of file html.php.

Referenced by Menu(), and print_menu().

Menu::position
 

Definition at line 629 of file html.php.

Referenced by add(), print_menu(), print_section(), and rm().

Menu::sub_menu
 

Definition at line 627 of file html.php.

Referenced by add(), print_menu(), print_section(), rm(), and set_type().

Menu::type
 

Definition at line 625 of file html.php.

Referenced by Menu(), print_menu(), and set_type().


The documentation for this class was generated from the following file:
Generated on Mon Nov 29 01:21:59 2004 for phpPgWeb by doxygen1.2.18