コード例 #1
0
ファイル: LanguageBar.php プロジェクト: altairsoft/plutos
 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);
 }
コード例 #2
0
ファイル: Portlet.php プロジェクト: altairsoft/plutos
 /**
  * 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();
 }