|
|
|
@ -93,6 +93,12 @@ class Nav extends Widget
|
|
|
|
|
* @see isItemActive |
|
|
|
|
*/ |
|
|
|
|
public $params; |
|
|
|
|
/** |
|
|
|
|
* @var string this property allows you to customize the HTML which is used to generate the drop down caret symbol, |
|
|
|
|
* which is displayed next to the button text to indicate the drop down functionality. |
|
|
|
|
* Defaults to `null` which means `<b class="caret"></b>` will be used. To disable the caret, set this property to be an empty string. |
|
|
|
|
*/ |
|
|
|
|
public $dropDownCaret; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -107,6 +113,9 @@ class Nav extends Widget
|
|
|
|
|
if ($this->params === null) { |
|
|
|
|
$this->params = Yii::$app->request->getQueryParams(); |
|
|
|
|
} |
|
|
|
|
if ($this->dropDownCaret === null) { |
|
|
|
|
$this->dropDownCaret = Html::tag('b', '', ['class' => 'caret']); |
|
|
|
|
} |
|
|
|
|
Html::addCssClass($this->options, 'nav'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -166,7 +175,9 @@ class Nav extends Widget
|
|
|
|
|
$linkOptions['data-toggle'] = 'dropdown'; |
|
|
|
|
Html::addCssClass($options, 'dropdown'); |
|
|
|
|
Html::addCssClass($linkOptions, 'dropdown-toggle'); |
|
|
|
|
$label .= ' ' . Html::tag('b', '', ['class' => 'caret']); |
|
|
|
|
if ($this->dropDownCaret !== '') { |
|
|
|
|
$label .= ' ' . $this->dropDownCaret; |
|
|
|
|
} |
|
|
|
|
if (is_array($items)) { |
|
|
|
|
if ($this->activateItems) { |
|
|
|
|
$items = $this->isChildActive($items, $active); |
|
|
|
|