Class Xmenu

Description

XMenu class A Generic Javascript Menu. This class provides a multi-level menu implemented in cross-browser Javascript. It should be compatible with Netscape 4, Netscape 6, and IE 4+.

Located in /xmenu-defs.php (line 52)

RenderableObject
   |
   --Xmenu
Variable Summary
Method Summary
 Xmenu Xmenu ([string $menu_name = "main"], [object $webpage = false], [mixed $stylesheet = ""], [integer $lang = -1], string $stylsheet)
 void display_in_webpage (object $webpage)
 string html ()
 void set_menu_images ([object $img_horiz_arrow = false], [object $img_vert_arrow = false], [object $img_spacer = false])
 void Xmenu_entry (mixed &$menuopts, mixed $prefix, mixed $mopid)
Variables
mixed $exists = false (line 73)

Whether this menu exists in the database

mixed $force_rebuild = false (line 98)

Whether to force rebuild or not

mixed $imgs_changed = false (line 104)

Whether images were changed or not

mixed $img_horiz_arrow (line 92)

Menu image object: horizontal arrow

mixed $img_spacer (line 95)

Menu image object: spacer

mixed $img_vert_arrow (line 89)

Menu image object: vertical arrow

mixed $language = 0 (line 57)

Menu language

mixed $menu (line 64)

The menu instance

mixed $menu_id = 0 (line 67)

Unique database menu ID

mixed $menu_name = "" (line 55)

Menu name eg: 'main'

mixed $menu_structure_changed = false (line 101)

Whether menu structure was rebuilt or not

mixed $menu_type = "vertical" (line 86)

Menu type from stylesheet: vertical, horizontal

mixed $stylesheet = "" (line 59)

Name of stylesheet file to get menu styles from

mixed $xmenu_configfile_path = "" (line 70)

Path to menu variables file - theme aware

mixed $xmenu_configfile_url = "" (line 82)

WWW Xmenu config URL - theme aware

mixed $xmenu_img = "" (line 79)

Home dir for Xmenu images

mixed $xmenu_js = "" (line 76)

Home dir for Xmenu scripts

Methods
Constructor Xmenu (line 114)

Constructor Create the Xmenu object.

Xmenu Xmenu ([string $menu_name = "main"], [object $webpage = false], [mixed $stylesheet = ""], [integer $lang = -1], string $stylsheet)
  • string $menu_name: Menu name
  • object $webpage: Webpage object that this menu is being created for
  • string $stylsheet: Name of stylesheet file to reference for menu styles
  • integer $lang: Optional language variant of this menu (zero = default)
display_in_webpage (line 681)

Display in webpage Inserts the javascript necessary to embed the menu into a given webpage.

NB: Normally the webpage passed in here is $RESPONSE.

void display_in_webpage (object $webpage)
  • object $webpage: Webpage object that this menu is being created for
html (line 709)

This renders the field as HTML.

Inserts the HTML DIV tag which the HVmenu will use to position itself to. The name of the DIV is taken from the unique menu ID, and corresponds to the TargetLoc variable defined above..

  • return: The menu anchor point (DIV) as HTML.
string html ()

Redefinition of:
RenderableObject::html()
Return output suitable for normal HTML-capable device. This method must be over-ridden by a method of the same name in the descendant class which renders output to web browsers.
set_default_images (line 226)

Set the standard images up. This method just re-asserts that the Xmenu should use the standard Xmenu images for arrows, spacer etc.

void set_default_images ()
set_menu_images (line 203)

Over-rides the standard icon images used to indicate submenus and spaces. The values passed should be image objects as instances of the 'img' class (@see img()).

void set_menu_images ([object $img_horiz_arrow = false], [object $img_vert_arrow = false], [object $img_spacer = false])
  • object $img_horiz_arrow: New image for 'horizontal arrow' icon
  • object $img_vert_arrow: New image for 'vertical arrow' icon
  • object $img_spacer: New image for 'spacer' icon
Xmenu_entry (line 622)

Recursively produce menu definition entries. These array

definitions define the menu structure in terms of the actual menus and their sub-menus. This routine produces a single menu-option definition, but will recursively call all child (sub-menu) definitions.

void Xmenu_entry (mixed &$menuopts, mixed $prefix, mixed $mopid)

Inherited Methods

Inherited From RenderableObject

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

Documentation generated by phpDocumentor 1.3.0RC3