macgyer\yii2materializecss\widgets\Spinner::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()
    {
        $html[] = Html::beginTag('div', $this->options);
        if ($this->flashColors !== false) {
            foreach ($this->colors as $color) {
                Html::addCssClass($this->spinnerOptions, ['color' => 'spinner-' . $color]);
                $html[] = Html::beginTag('div', $this->spinnerOptions);
                $html[] = $this->renderSpinner();
                $html[] = Html::endTag('div');
                Html::removeCssClass($this->spinnerOptions, ['color' => 'spinner-' . $color]);
            }
        } else {
            $html[] = Html::beginTag('div', $this->spinnerOptions);
            $html[] = $this->renderSpinner();
            $html[] = Html::endTag('div');
        }
        $html[] = Html::endTag('div');
        return implode("\n", $html);
    }