CSGuiMenubar
in package
The CSGuiMenubar provides a horizontal CONTENTSERV Menubar
This class has no public constructor, use the factory method instead.
Tags
Table of Contents
- $id : mixed
- $menus : mixed
- $popupHandlerURL : mixed
- $rightTitle : mixed
- $rightTooltip : mixed
- $showMouseOverEffects : mixed
- __construct() : mixed
- addHandle() : void
- Adds a handle as next item in the Menubar
- addHelp() : void
- Adds a help popup menu to the Menubar
- addItem() : mixed
- Adds a popup menu entry to the Menubar
- addLink() : void
- Adds a menu to the Menubar, which represents a link
- addMenu() : void
- Adds a popup menu to the Menubar, which request a popup menu from the server if it is clicked
- addPopupMenu() : void
- Adds a popup menu to the Menubar. If there had been already one popup defined with the same label this popup is appended to it.
- disableMouseOverEffects() : void
- Disables the mouse hover effects to avoid flickering on some pages
- getMenubarPopup() : Popup|null
- Returns a singe Popup object with all menubar items as popup elements
- makeHtml() : html
- Returns the html representation of the menubar
- preparePopupMenus() : mixed
- removeAllMenus() : void
- Removes all menus from the Menubar
- setRightTitle() : void
- Sets an arbitrary html text on the right end of the menubar
Properties
$id
public
mixed
$id
Tags
$menus
public
mixed
$menus
Tags
$popupHandlerURL
public
mixed
$popupHandlerURL
Tags
$rightTitle
public
mixed
$rightTitle
Tags
$rightTooltip
public
mixed
$rightTooltip
Tags
$showMouseOverEffects
public
mixed
$showMouseOverEffects
= \true
Tags
Methods
__construct()
public
__construct([mixed $popupHandlerURL = '' ][, mixed $id = '' ]) : mixed
Parameters
- $popupHandlerURL : mixed = ''
- $id : mixed = ''
Tags
Return values
mixed —addHandle()
Adds a handle as next item in the Menubar
public
addHandle() : void
Tags
Return values
void —addHelp()
Adds a help popup menu to the Menubar
public
addHelp([string $module = '' ]) : void
Parameters
- $module : string = ''
-
the module for which the help should be displayed
Tags
Return values
void —addItem()
Adds a popup menu entry to the Menubar
public
addItem(string $label, string $javascript[, string $img = "" ][, string $menubar = 'GUI_MENU_FILE' ][, bool $addSeparator = false ]) : mixed
Parameters
- $label : string
-
the label of the entry which is displayed in the menu
- $javascript : string
-
the javascript code which is evaluated on click
- $img : string = ""
-
the optional menubar image
- $menubar : string = 'GUI_MENU_FILE'
-
the menubar the item should be placed within
- $addSeparator : bool = false
-
whether a Separator should be added before this item
Tags
Return values
mixed —addLink()
Adds a menu to the Menubar, which represents a link
public
addLink(string $label[, string $href = '#' ][, string $target = '' ][, string $onClick = '' ][, string $accesskey = '' ]) : void
Parameters
- $label : string
-
the label which is displayed in the menu
- $href : string = '#'
-
the href of the link
- $target : string = ''
-
the target frame of the link
- $onClick : string = ''
-
the javascript code which is called when clicking on the link
- $accesskey : string = ''
-
the keybord access key of the menu
Tags
Return values
void —addMenu()
Adds a popup menu to the Menubar, which request a popup menu from the server if it is clicked
public
addMenu(string $id, string $label[, string $src = '' ][, string $accesskey = '' ]) : void
Parameters
- $id : string
-
the id which is added to the popup request
- $label : string
-
the label which is displayed in the menu
- $src : string = ''
-
the url where the popup is requested from. If it is not set the url definied with the menubarSetUrl method is taken.
- $accesskey : string = ''
-
the keybord access key of the menu
Tags
Return values
void —addPopupMenu()
Adds a popup menu to the Menubar. If there had been already one popup defined with the same label this popup is appended to it.
public
addPopupMenu(string $label, CSGuiComponent $popup[, string $accesskey = '' ]) : void
Parameters
- $label : string
-
the label which is displayed in the menu. If there had been already one popup defined for this label this popup is appended.
- $popup : CSGuiComponent
-
the CSGuiComponent which contains the Popup
- $accesskey : string = ''
-
the keybord access key of the menu
Tags
Return values
void —disableMouseOverEffects()
Disables the mouse hover effects to avoid flickering on some pages
public
disableMouseOverEffects([bool $disable = true ]) : void
Parameters
- $disable : bool = true
-
whether the mouse over effects should be disabled or not
Tags
Return values
void —getMenubarPopup()
Returns a singe Popup object with all menubar items as popup elements
public
getMenubarPopup() : Popup|null
Tags
Return values
Popup|null —makeHtml()
Returns the html representation of the menubar
public
makeHtml() : html
Tags
Return values
html —code of the toolbar
preparePopupMenus()
public
preparePopupMenus() : mixed
Tags
Return values
mixed —removeAllMenus()
Removes all menus from the Menubar
public
removeAllMenus() : void
Tags
Return values
void —setRightTitle()
Sets an arbitrary html text on the right end of the menubar
public
setRightTitle(string $title[, string $tooltip = '' ]) : void
Parameters
- $title : string
-
the text in the menubar
- $tooltip : string = ''
-
the tooltip of the title text in the menubar
