Blame view

frontend/widgets/Nav.php 749 Bytes
c7048abc   Anastasia   - nav widget with...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  <?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, []);
          }
      }