Nav.php
749 Bytes
<?php
/**
* Created by PhpStorm.
* User: stes
* Date: 25.05.18
* Time: 17:55
*/
namespace frontend\widgets;
use yii\helpers\Html;
class Nav extends \yii\bootstrap\Nav
{
public function init()
{
if ($this->route === null && \Yii::$app->controller !== null) {
$this->route = \Yii::$app->controller->getRoute();
}
if ($this->params === null) {
$this->params = \Yii::$app->request->getQueryParams();
}
if ($this->dropDownCaret === null) {
$this->dropDownCaret = '<span class="caret"></span>';
}
Html::addCssClass($this->options, []);
}
}