\TbDropdown

## Bootstrap dropdown menu.

Summary

Methods
Properties
Constants
getDividerCssClass()
getDropdownCssClass()
isVertical()
init()
No public properties found
No constants found
renderMenu()
renderMenuItem()
normalizeItems()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

getDividerCssClass()

getDividerCssClass() : string

### .getDividerCssClass()

Returns the divider CSS class.

Returns

string —

the class name

getDropdownCssClass()

getDropdownCssClass() : string

### .getDropdownCssClass()

Returns the dropdown css class.

Returns

string —

the class name

isVertical()

isVertical() : boolean

### .isVertical()

Returns whether this is a vertical menu.

Returns

boolean —

the result

init()

init()

### .init()

Initializes the widget.

renderMenu()

renderMenu(array $items)

### .renderMenu()

Renders the menu items.

Parameters

array $items

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()

renderMenuItem(array $item) : string

### .renderMenuItem()

Renders the content of a menu item. Note that the container and the sub-menus are not rendered here.

Parameters

array $item

the menu item to be rendered. Please see {@link items} on what data might be in the item.

Returns

string —

the rendered item

normalizeItems()

normalizeItems(array $items, string $route, boolean $active) : array

### .normalizeItems()

Normalizes the {@link items} property so that the 'active' state is properly identified for every menu item.

Parameters

array $items

the items to be normalized.

string $route

the route of the current request.

boolean $active

whether there is an active child menu item.

Returns

array —

the normalized menu items