Beispiel #1
0
 /**
  * @inheritdoc
  */
 protected function initOptions()
 {
     parent::initOptions();
     if ($this->closeButton !== false) {
         Html::addCssClass($this->options, 'alert-dismissable');
     }
 }
Beispiel #2
0
 /**
  * Initializes the widget options.
  * This method sets the default values for various options.
  */
 protected function initOptions()
 {
     parent::initOptions();
     if (empty($this->options['id'])) {
         $this->options['id'] = $this->getId();
     }
     $this->registerAssets();
     Html::addCssClass($this->options, 'kv-alert ' . $this->type);
 }