submenus = array(); $this->addLink($link); $this->addLabel($label, $pos); $this->addFlyout($flyout); } function isSeparator() { $this->separator = true; } function addLabel($label=' ', $pos='right') { if ($label) $this->label = $label; $this->labelpos = $pos; } function addLink($link='#') { $this->link = $link; } function addOnclick($onclick) { $this->onclick = $onclick; } function addIcon($icon, $hovericon=null) { global $WT_IMAGES; if (isset($WT_IMAGES[$icon])) { $this->icon = $WT_IMAGES[$icon]; } else { $this->icon = null; } if (isset($WT_IMAGES[$hovericon])) { $this->hovericon = $WT_IMAGES[$hovericon]; } else { $this->hovericon = null; } } function addFlyout($flyout='down') { $this->flyout = $flyout; } function addClass($class, $hoverclass='', $submenuclass='', $iconclass='icon_general') { $this->class = $class; $this->hoverclass = $hoverclass; $this->submenuclass = $submenuclass; $this->iconclass = $iconclass; } function addTarget($target) { $this->target = $target; } function addSubMenu($obj) { $this->submenus[] = $obj; } function addSeparator() { $submenu = new Menu(); $submenu->isSeparator(); $this->submenus[] = $submenu; } // Get the menu as a simple list - for accessible interfaces, search engines and CSS menus function getMenuAsList() { $link = ''; if ($this->separator) { return "\t".'