public function run()
    {
        if ($this->showOnEmpty || $this->dataProvider->getCount() > 0) {
            $content = preg_replace_callback('/{\\w+}/', function ($matches) {
                $content = $this->renderSection($matches[0]);

                return $content === false ? $matches[0] : $content;
            }, $this->layout);
        } else {
            $content = $this->renderEmpty();
        }

        $options = $this->options;
        $tag = ArrayHelper::remove($options, 'tag', 'div');
        echo Html::tag($tag, $content, $options);
    }
public function run()
    {
        if ($this->showOnEmpty || $this->dataProvider->getCount() > 0) {
            $content = preg_replace_callback('/{\\w+}/', function ($matches) {
                $content = $this->renderSection($matches[0]);

                return $content === false ? $matches[0] : $content;
            }, $this->layout);
        } else {
            $content = $this->renderEmpty();
        }

        $options = $this->options;
        $tag = ArrayHelper::remove($options, 'tag', 'div');
        echo Html::tag($tag, $content, $options);
    }
public function run ( ) { if ( $ this -> showOnEmpty || $ this -> dataProvider -> getCount ( ) > 0 ) { $ content = preg_replace_callback ( '/{\\w+}/' , function ( $ matches ) { $ content = $ this -> renderSection ( $ matches [ 0 ] ) ; return $ content === false ? $ matches [ 0 ] : $ content ; } , $ this -> layout ) ; } else { $ content = $ this -> renderEmpty ( ) ; } $ options = $ this -> options ; $ tag = ArrayHelper :: remove ( $ options , 'tag' , 'div' ) ; echo Html :: tag ( $ tag , $ content , $ options ) ; }
Runs the widget.
Runs the widget .