public function init() { parent::init(); if ($this->currentLanguage === null) { $this->currentLanguage = Language::getCurrent(); } if ($this->allowedLanguages === null) { $this->allowedLanguages = Language::find()->where('`id` != :id', [':id' => $this->currentLanguage->id])->all(); } $this->cssClass .= ' dropdown dropdown-language'; $this->options['class'] = trim($this->cssClass); }
/** * Initializes the widget. */ public function init() { parent::init(); Html::addCssClass($this->options, trim(sprintf('portlet %s %s', $this->type, $this->background))); echo Html::beginTag('div', $this->options); $this->_renderTitle(); Html::addCssClass($this->bodyOptions, 'portlet-body'); echo Html::beginTag('div', $this->bodyOptions); $this->_renderScrollerBegin(); }