/** * 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()]); } }
/** * Renders the closing tag of the field container. * * @return string the rendering result. */ public function end() { return Html::endTag(isset($this->options['tag']) ? $this->options['tag'] : 'div') . "\n"; }