phpDocumentor menu
[ class tree: menu ] [ index: menu ] [ all elements ]

Class: Menu

Source Location: /myphp-1.9/myphp-1.9-menu/html/page/Menu.php

Class Menu

Class Overview

Generates a Menu element (tab,top,left,right or bottom menu)

  1. +-------------------------------------+
  2. | menu1 | menu2 | menu3 | | menux | (i.e. top menu)
  3. +-------------------------------------+
  4. Usage:
  5. $menu = new Menu($links,$type,$text,$width,$class);
  6. print $menu->getHtml();
  7. Or
  8. Menu::display($links,$type,$text,$width,$class);

Located in /myphp-1.9/myphp-1.9-menu/html/page/Menu.php [line 40]

Object
   |
   --Html
      |
      --Menu

Properties

Methods

[ Top ]
Direct descendents
Child Class Description
BottomMenu Generates a Bottom Menu element
LeftMenu Generates a Left Menu element
RightMenu Generates a Right Menu element
TabMenu Generates a Tab Menu element
TopMenu Generates a Top Menu element

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From Html

Html::$elements
Html::$sizeof

Inherited From Object

Object::$cachefile
Object::$html
Object::$sql

Inherited From Html

Html::Html()
Constructor
Html::add()
Add an element, the number of elements are stored internally in an array.
Html::content()
Read the content of the specified filename
Html::display()
Display the html
Html::get()
Get the complete html for a key
Html::getAttribute()
Get the complete html for an attribute, i.e. <a class="myclass" ...
Html::getElement()
Get the element at position $i in array
Html::getElements()
Get all the elements as html
Html::getHtml()
Get Html
Html::getHtmlHelp()
Get html help
Html::getSizeof()
Get the number of elements added
Html::getTag()
Get the complete html for a html tag, i.e. <p>My paragraph</p>
Html::read()
Read the content of the specified filename and language
Html::set()
Set the named attribute (key) of a class to specified value
Html::setObject()
Set the named object to the class attribute (key), with same name
Html::showsource()
Show source
Html::update()
Save the content of the specified filename and language

Inherited From Object

Object::Object()
Constructor
Object::addHtml()
Add the current html to the SourceCode object
Object::getCacheFileName()
Returns the name of the cache file name
Object::getClassName()
Returns the name of the instanciated class
Object::getHtml()
Returns the html for the element
Object::getMsg()
Get the formatted message and debug level and Log to file ?
Object::save()
Save the SQL cache file
Object::setCacheFileName()
Set the path/name of the cache file
Object::toString()
Returns the information for this class
Object::write()
Write the content to the file opened by fp

[ Top ]
Property Summary
mixed   $border  
mixed   $caption  
mixed   $cellPadding  
mixed   $cellSpacing  
mixed   $class  
mixed   $links  
mixed   $summary  
mixed   $text  
mixed   $type  
mixed   $width  

[ Top ]
Method Summary
Menu   Menu()   Constructor
void   addLinks()   Add an array of menu links
void   display()   Display html
String   getBottomHtml()   Get the html for the bottom menu links
String   getHtml()   Builds the html for a menu, and return it
String   getLeftHtml()   Get the html for the left menu links
String   getLeftRightHtml()   Get the html for the left menu links
String   getRightHtml()   Get the html for the right menu links
String   getTabHtml()   Get the html for the Tab menu links
String   getTopHtml()   Get the html for the top menu links
void   setMenu()   Set the objects for the Menu

[ Top ]
Properties
mixed   $border = '' [line 45]

[ Top ]
mixed   $caption = '' [line 50]

[ Top ]
mixed   $cellPadding = '' [line 47]

[ Top ]
mixed   $cellSpacing = '' [line 48]

[ Top ]
mixed   $class = '' [line 46]

[ Top ]
mixed   $links = array() [line 54]

[ Top ]
mixed   $summary = '' [line 49]

[ Top ]
mixed   $text = '' [line 41]

[ Top ]
mixed   $type = '' [line 52]

[ Top ]
mixed   $width = '' [line 44]

[ Top ]
Methods
Constructor Menu  [line 63]

  Menu Menu( [String $type = ''], [String $text = ''], [String $width = ''], [String $class = '']  )

Constructor

Parameters:
String   $type:  Type of menu, one of: tab, top, left, right, or bottom
String   $text:  The text above the menu links
String   $width:  The width of the menu
String   $class:  The css class for the menu


[ Top ]
addLinks  [line 174]

  void addLinks( array $links  )

Add an array of menu links

The array must have the following format

  1. $links =
  2. array(
  3. array('text'=>'text 0','href'=>'href0/','title'=>'title 0','class'=>'Menu'),
  4. array('text'=>'text 1','href'=>'href1/','title'=>'title 1'),
  5. array('text'=>'text 2','href'=>'href2/','title'=>'title 2'),
  6. );

Parameters:
array   $links:  The array of menu links


[ Top ]
display  [line 434]

  void display( array $links, [String $type = ''], [String $text = ''], [String $width = ''], [String $class = '']  )

Display html

  1. Usage:
  2. Menu::display($links,$type,$text,$width,$class);

Parameters:
array   $links:  An array of links
String   $type:  Type of menu, one of: tab, top, left, right, or bottom
String   $text:  The text above the menu links
String   $width:  The width of the menu
String   $class:  The css class for the menu

API Tags:
Static:  


Redefinition of:
Html::display()
Display the html

Redefined in descendants as:

[ Top ]
getBottomHtml  [line 269]

  String getBottomHtml( )

Get the html for the bottom menu links


API Tags:
Return:  The html


[ Top ]
getHtml  [line 130]

  String getHtml( )

Builds the html for a menu, and return it


API Tags:
Return:  The html


Redefinition of:
Html::getHtml()
Get Html

[ Top ]
getLeftHtml  [line 245]

  String getLeftHtml( )

Get the html for the left menu links


API Tags:
Return:  The html


[ Top ]
getLeftRightHtml  [line 195]

  String getLeftRightHtml( )

Get the html for the left menu links


API Tags:
Return:  The html


[ Top ]
getRightHtml  [line 257]

  String getRightHtml( )

Get the html for the right menu links


API Tags:
Return:  The html


[ Top ]
getTabHtml  [line 377]

  String getTabHtml( )

Get the html for the Tab menu links


API Tags:
Return:  The html


[ Top ]
getTopHtml  [line 322]

  String getTopHtml( )

Get the html for the top menu links


API Tags:
Return:  The html


[ Top ]
setMenu  [line 389]

  void setMenu( String $type  )

Set the objects for the Menu

Parameters:
String   $type:  one of tabmenu, topmenu, leftmenu, rightmenu, or bottommenu


[ Top ]

Documentation generated on Thu, 22 Dec 2005 17:13:11 +0100 by phpDocumentor 1.3.0RC3