Exemplo n.º 1
0
 /**
  * Initializes the widget.
  * If you override this method, make sure you call the parent implementation first.
  */
 public function init()
 {
     parent::init();
     Html::addCssClass($this->options, 'f-dropdown');
     $this->options['data-dropdown-content'] = 1;
     $this->options['tabindex'] = '-1';
     $this->_containerOptions = $this->options;
 }
Exemplo n.º 2
0
 /**
  * 
  */
 public function init()
 {
     parent::init();
     Html::addCssClass($this->options, 'icon-bar');
     if (empty($this->options['role'])) {
         $this->options['role'] = 'navigation';
     }
     FoundationIconAsset::register($this->getView());
 }
Exemplo n.º 3
0
 /**
  * 
  */
 public function init()
 {
     parent::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();
     }
 }
Exemplo n.º 4
0
 /**
  * 
  */
 public function init()
 {
     parent::init();
     Html::addCssClass($this->options, 'top-bar');
     if (empty($this->options['role'])) {
         $this->options['role'] = 'navigation';
     }
     $this->options['data-topbar'] = 1;
     $options = $this->options;
     $tag = ArrayHelper::remove($options, 'tag', 'nav');
     if (!empty($this->containerOptions)) {
         echo Html::beginTag('div', $this->containerOptions);
     }
     echo Html::beginTag($tag, $options);
     echo Html::tag('ul', implode("\n", $this->headerItems()), ['class' => 'title-area']);
 }
Exemplo n.º 5
0
 /**
  * Initializes the widget.
  * If you override this method, make sure you call the parent implementation first.
  */
 public function init()
 {
     parent::init();
     $this->clientOptions = false;
     $this->options['role'] = 'button';
 }
Exemplo n.º 6
0
 /**
  * Initializes the widget.
  * If you override this method, make sure you call the parent implementation first.
  */
 public function init()
 {
     parent::init();
     Html::addCssClass($this->options, 'button-group');
 }