public function init() { parent::init(); if (null === $this->iconClass) { throw new InvalidConfigException('iconClass must be set'); } Html::addCssClass($this->options, ['weui_msg']); }
public function init() { parent::init(); if (null === $this->type) { throw new InvalidConfigException('type must be set'); } Html::addCssClass($this->options, [$this->type]); }
/** * Initializes the widget. * If you override this method, make sure you call the parent implementation first. */ public function init() { parent::init(); if (null !== $this->url) { $this->url = Url::to($this->url); } if (null === $this->tagName) { $this->tagName = null === $this->url ? 'button' : 'a'; } if ($this->url && $this->tagName === 'a') { $this->options['href'] = $this->url; } }