PHP Class TbBaseMenu

Inheritance: extends CMenu
Show file Open project: yinhe/yincart Class Usage Examples

Public Methods

Method Description
getDividerCssClass ( ) : string ### .getDividerCssClass()
getDropdownCssClass ( ) : string ### .getDropdownCssClass()
isVertical ( ) : boolean ### .isVertical()

Protected Methods

Method Description
normalizeItems ( array $items, string $route, boolean &$active ) : array ### .normalizeItems()
renderMenu ( array $items ) ### .renderMenu()
renderMenuItem ( array $item ) : string ### .renderMenuItem()

Method Details

getDividerCssClass() abstract public method

Returns the divider css class.
abstract public getDividerCssClass ( ) : string
return string the class name

getDropdownCssClass() abstract public method

Returns the dropdown css class.
abstract public getDropdownCssClass ( ) : string
return string the class name

isVertical() abstract public method

Returns whether this is a vertical menu.
abstract public isVertical ( ) : boolean
return boolean the result

normalizeItems() protected method

Normalizes the {@link items} property so that the 'active' state is properly identified for every menu item.
protected normalizeItems ( array $items, string $route, boolean &$active ) : array
$items array the items to be normalized.
$route string the route of the current request.
$active boolean whether there is an active child menu item.
return array the normalized menu items

renderMenu() protected method

Renders the menu items.
protected renderMenu ( array $items )
$items array menu items. Each menu item will be an array with at least two elements: 'label' and 'active'. It may have three other optional elements: 'items', 'linkOptions' and 'itemOptions'.

renderMenuItem() protected method

Renders the content of a menu item. Note that the container and the sub-menus are not rendered here.
protected renderMenuItem ( array $item ) : string
$item array the menu item to be rendered. Please see {@link items} on what data might be in the item.
return string the rendered item