Class yeesoft\widgets\Nav

Inheritanceyeesoft\widgets\Nav » yii\bootstrap\Nav

Class Nav

Show only those items in navigation menu which user can see. If item has no "visible" key, than "visible" => User::canRoute($item['url') will be added.

Nav support sub-dropdown menus. Submenus has no nested level limit.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
init() yeesoft\widgets\Nav
renderItem() Renders a widget's item. yeesoft\widgets\Nav
renderItems() Renders widget items. yeesoft\widgets\Nav

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
ensureVisibility() yeesoft\widgets\Nav

Method Details

ensureVisibility() protected method

protected bool ensureVisibility ( &$items )
$items array
init() public method

public void init ( )
renderItem() public method

Renders a widget's item.

public string renderItem ( $item, $level 0 )
$item string|array

The item to render.

$level int

Navigation nested level.

return string

The rendering result.

throws \yii\base\InvalidConfigException
renderItems() public method

Renders widget items.

public string renderItems ( $itemsList NULL, $level 0 )
$itemsList string|array

Items to render.

$level int

Navigation nested level.

return string

The rendering result.

throws \yii\base\InvalidConfigException