|
|
@ -93,6 +93,12 @@ class Nav extends Widget |
|
|
|
* @see isItemActive |
|
|
|
* @see isItemActive |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public $params; |
|
|
|
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) { |
|
|
|
if ($this->params === null) { |
|
|
|
$this->params = Yii::$app->request->getQueryParams(); |
|
|
|
$this->params = Yii::$app->request->getQueryParams(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if ($this->dropDownCaret === null) { |
|
|
|
|
|
|
|
$this->dropDownCaret = Html::tag('b', '', ['class' => 'caret']); |
|
|
|
|
|
|
|
} |
|
|
|
Html::addCssClass($this->options, 'nav'); |
|
|
|
Html::addCssClass($this->options, 'nav'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -166,7 +175,9 @@ class Nav extends Widget |
|
|
|
$linkOptions['data-toggle'] = 'dropdown'; |
|
|
|
$linkOptions['data-toggle'] = 'dropdown'; |
|
|
|
Html::addCssClass($options, 'dropdown'); |
|
|
|
Html::addCssClass($options, 'dropdown'); |
|
|
|
Html::addCssClass($linkOptions, 'dropdown-toggle'); |
|
|
|
Html::addCssClass($linkOptions, 'dropdown-toggle'); |
|
|
|
$label .= ' ' . Html::tag('b', '', ['class' => 'caret']); |
|
|
|
if ($this->dropDownCaret !== '') { |
|
|
|
|
|
|
|
$label .= ' ' . $this->dropDownCaret; |
|
|
|
|
|
|
|
} |
|
|
|
if (is_array($items)) { |
|
|
|
if (is_array($items)) { |
|
|
|
if ($this->activateItems) { |
|
|
|
if ($this->activateItems) { |
|
|
|
$items = $this->isChildActive($items, $active); |
|
|
|
$items = $this->isChildActive($items, $active); |
|
|
|