예제 #1
0
 /**
  * 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()]);
     }
 }
예제 #2
0
 /**
  * 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";
 }