Class sitemenu

Description

Site Menu class - a database-enabled extension of the menu class.

The menu is built from the standard library database menu structure. This database structure comprises two tables: 'menu' and 'menuoption'. Use this menu renderer for simple single-row or single-column menus. It is rendered as a simple list of items as clickable links. It also automatically applies highlighting to the option which has an 'action' which matches the current $RESPONSE page.

Located in /menu-defs.php (line 562)

RenderableObject
   |
   --StylableObject
      |
      --menu
         |
         --sitemenu
Variable Summary
 mixed $language
 mixed $menu_level
 mixed $menu_name
Method Summary
 sitemenu sitemenu ([mixed $menuname = "main"], [integer $menu_level = MENU_LEVEL_ALL], [string $title = ""], [integer $orientation = VERTICAL], integer $wrap_threshold, [integer $lang = -1], string $name)
 void getmenu ([mixed $name = ""], [mixed $lang = -1], string $id)
Variables
mixed $language = 0 (line 568)

Language variant of this menu eg: 'fr'

mixed $menu_level = MENU_LEVEL_ALL (line 566)

Level of menuitems to return

mixed $menu_name = "" (line 564)

Name of this menu eg: 'main'

Inherited Variables

Inherited from menu

menu::$highlightclass
menu::$items
menu::$item_count
menu::$name
menu::$orientation
menu::$separator
menu::$title
menu::$title_font
menu::$wrap_threshold

Inherited from StylableObject

StylableObject::$class
StylableObject::$id
StylableObject::$style
Methods
Constructor sitemenu (line 583)

Constructor

The name is used when rendering jump menu select boxes, the level is the menu level starting at zero (default), the title is rendered above the list if specified, orientation is VERTICAL or HORIZONTAL, wrap_threshold tells it where to wrap to the next row (HORIZONTAL) or column (VERTICAL).

sitemenu sitemenu ([mixed $menuname = "main"], [integer $menu_level = MENU_LEVEL_ALL], [string $title = ""], [integer $orientation = VERTICAL], integer $wrap_threshold, [integer $lang = -1], string $name)
  • string $name: Menu name used to identify the menu
  • integer $menu_level: Level of menuitems to return
  • string $title: Title/benner for this menu
  • integer $orientation: HORIZONTAL or VERTICAL
  • integer $wrap_threshold: Number of items before wrapping occurs
  • integer $lang: Language variant for menu (or default if zero)
getmenu (line 611)

Get the menu Read the menuitems in from database and apply security..

void getmenu ([mixed $name = ""], [mixed $lang = -1], string $id)
  • string $id: Unique database menu identifier

Inherited Methods

Inherited From menu

 menu::menu()
 menu::additem()
 menu::add_menuitem()
 menu::html()
 menu::set_itemfont()
 menu::set_titlefont()
 menu::wml()
 menu::wmlup()
 menu::wml_morelink()

Inherited From StylableObject

 StylableObject::StylableObject()
 StylableObject::clearstyle()
 StylableObject::setclass()
 StylableObject::setcss()
 StylableObject::setid()
 StylableObject::setstyle()

Inherited From RenderableObject

 RenderableObject::RenderableObject()
 RenderableObject::html()
 RenderableObject::render()
 RenderableObject::wml()
 RenderableObject::wmlup()
 RenderableObject::xml()

Documentation generated by phpDocumentor 1.3.0RC3