macgyer\yii2materializecss\widgets\Button::run PHP Method

run() public method

Executes the widget.
public run ( ) : string
return string the result of widget execution to be outputted.
    public function run()
    {
        if ($this->label !== false) {
            $label = $this->encodeLabel ? Html::encode($this->label) : $this->label;
        } else {
            $label = '';
        }
        $content = $this->renderIcon() . $label;
        return $this->tagName === 'button' ? Html::button($content, $this->options) : Html::tag($this->tagName, $content, $this->options);
    }

Usage Example

 /**
  * Executes the widget.
  *
  * @return string the rendered markup.
  */
 public function run()
 {
     return parent::run();
 }