|
|
@ -171,12 +171,7 @@ class Nav extends Widget |
|
|
|
if ($this->activateItems) { |
|
|
|
if ($this->activateItems) { |
|
|
|
$items = $this->isChildActive($items, $active); |
|
|
|
$items = $this->isChildActive($items, $active); |
|
|
|
} |
|
|
|
} |
|
|
|
$items = Dropdown::widget([ |
|
|
|
$items = $this->renderDropdown($items); |
|
|
|
'items' => $items, |
|
|
|
|
|
|
|
'encodeLabels' => $this->encodeLabels, |
|
|
|
|
|
|
|
'clientOptions' => false, |
|
|
|
|
|
|
|
'view' => $this->getView(), |
|
|
|
|
|
|
|
]); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -188,6 +183,23 @@ class Nav extends Widget |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
|
|
|
|
* Renders the given items as a dropdown. |
|
|
|
|
|
|
|
* This method is called to create sub-menus. |
|
|
|
|
|
|
|
* @param array $items the given items. Please refer to [[Dropdown::items]] for the array structure. |
|
|
|
|
|
|
|
* @return string the rendering result. |
|
|
|
|
|
|
|
* @since 2.0.1 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
protected function renderDropdown($items) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return Dropdown::widget([ |
|
|
|
|
|
|
|
'items' => $items, |
|
|
|
|
|
|
|
'encodeLabels' => $this->encodeLabels, |
|
|
|
|
|
|
|
'clientOptions' => false, |
|
|
|
|
|
|
|
'view' => $this->getView(), |
|
|
|
|
|
|
|
]); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* Check to see if a child item is active optionally activating the parent. |
|
|
|
* Check to see if a child item is active optionally activating the parent. |
|
|
|
* @param array $items @see items |
|
|
|
* @param array $items @see items |
|
|
|
* @param boolean $active should the parent be active too |
|
|
|
* @param boolean $active should the parent be active too |
|
|
|