/** * Initializes the widget. */ public function init() { parent::init(); $this->clientOptions = false; Html::addCssClass($this->options['class'], 'main-sidebar'); $tag = ArrayHelper::remove($this->options, 'tag', 'aside'); echo Html::beginTag($tag, $this->options); Html::addCssClass($this->containerOptions['class'], 'sidebar'); $containerOptions = $this->containerOptions; $tag = ArrayHelper::remove($containerOptions, 'tag', 'section'); echo Html::beginTag($tag, $containerOptions); }
/** * Initializes the widget. */ public function init() { parent::init(); $this->clientOptions = false; Html::addCssClass($this->containerOptions['class'], 'main-header'); $containerOptions = $this->containerOptions; $tag = ArrayHelper::remove($containerOptions, 'tag', 'header'); echo Html::beginTag($tag, $containerOptions); if ($this->brandLabel !== false && $this->brandLabelMini !== false) { Html::addCssClass($this->brandOptions, 'logo'); echo Html::a(Html::tag('span', $this->brandLabelMini, ['class' => 'logo-mini']) . Html::tag('span', $this->brandLabel, ['class' => 'logo-lg']), $this->brandUrl === false ? Yii::$app->homeUrl : $this->brandUrl, $this->brandOptions); } if (empty($this->options['class'])) { Html::addCssClass($this->options, 'navbar navbar-static-top'); } else { Html::addCssClass($this->options, 'navbar'); } if (empty($this->options['role'])) { $this->options['role'] = 'navigation'; } $options = $this->options; $tag = ArrayHelper::remove($options, 'tag', 'nav'); echo Html::beginTag($tag, $options); echo $this->renderToggleButton(); //parent::init(); /* $this->clientOptions = false; if (empty($this->options['class'])) { Html::addCssClass($this->options, ['navbar', 'navbar-default']); } else { Html::addCssClass($this->options, ['widget' => 'navbar']); } if (empty($this->options['role'])) { $this->options['role'] = 'navigation'; } $options = $this->options; $tag = ArrayHelper::remove($options, 'tag', 'nav'); echo Html::beginTag($tag, $options); if ($this->renderInnerContainer) { if (!isset($this->innerContainerOptions['class'])) { Html::addCssClass($this->innerContainerOptions, 'container'); } echo Html::beginTag('div', $this->innerContainerOptions); } echo Html::beginTag('div', ['class' => 'navbar-header']); if (!isset($this->containerOptions['id'])) { $this->containerOptions['id'] = "{$this->options['id']}-collapse"; } echo $this->renderToggleButton(); if ($this->brandLabel !== false) { Html::addCssClass($this->brandOptions, ['widget' => 'navbar-brand']); echo Html::a($this->brandLabel, $this->brandUrl === false ? Yii::$app->homeUrl : $this->brandUrl, $this->brandOptions); } echo Html::endTag('div'); Html::addCssClass($this->containerOptions, ['collapse' => 'collapse', 'widget' => 'navbar-collapse']); $options = $this->containerOptions; $tag = ArrayHelper::remove($options, 'tag', 'div'); echo Html::beginTag($tag, $options);*/ }
/** * Initializes the widget. */ public function init() { parent::init(); $this->clientOptions = false; }
/** * Initializes the widget. * If you override this method, make sure you call the parent implementation first. */ public function init() { parent::init(); $this->clientOptions = false; Html::addCssClass($this->options, 'btn btn-block btn-primary btn-sm'); }