Example #1
0
 /**
  * Renders a toggle button.
  */
 public function renderToggleButton()
 {
     if (!isset($this->caption)) {
         throw new InvalidConfigException("Option 'caption' can't be empty!");
     }
     // Nav options
     $this->options = array_merge(['data-uk-toggle' => "{target:'.{$this->options['id']}'}"], $this->options);
     return Button::widget(['options' => $this->options]);
 }