/** * Renders the widget. */ public function run() { $this->registerPlugin('button'); if ($this->includeContainer) { Html::addCssClass($this->containerOptions, 'btn-group'); $options = $this->containerOptions; $tag = ArrayHelper::remove($options, 'tag', 'div'); return implode("\n", [Html::beginTag($tag, $options), $this->renderButton(), $this->renderDropdown(), Html::endTag($tag)]); } else { return implode("\n", [$this->renderButton(), $this->renderDropdown()]); } }