yii\bootstrap\ButtonDropdown::run PHP Method

run() public method

Renders the widget.
public run ( )
    public function run()
    {
        // @todo use [[options]] instead of [[containerOptions]] and introduce [[buttonOptions]] before 2.1 release
        Html::addCssClass($this->containerOptions, ['widget' => 'btn-group']);
        $options = $this->containerOptions;
        $tag = ArrayHelper::remove($options, 'tag', 'div');
        $this->registerPlugin('button');
        return implode("\n", [Html::beginTag($tag, $options), $this->renderButton(), $this->renderDropdown(), Html::endTag($tag)]);
    }

Usage Example

Example #1
0
 public function run()
 {
     $view = $this->getView();
     if ($this->clientOptions !== false) {
         $js = "\$.widget.bridge('uibutton', \$.ui.button);";
         $view->registerJs($js);
     }
     return parent::run();
 }
All Usage Examples Of yii\bootstrap\ButtonDropdown::run