Ejemplo n.º 1
0
 public function init()
 {
     parent::init();
     if (null === $this->iconClass) {
         throw new InvalidConfigException('iconClass must be set');
     }
     Html::addCssClass($this->options, ['weui_msg']);
 }
Ejemplo n.º 2
0
 public function init()
 {
     parent::init();
     if (null === $this->type) {
         throw new InvalidConfigException('type must be set');
     }
     Html::addCssClass($this->options, [$this->type]);
 }
Ejemplo n.º 3
0
 /**
  * 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;
     }
 }