Beispiel #1
0
 public function run()
 {
     parent::run();
     if (!empty($this->ajaxOptions)) {
         $this->registerAjaxScript();
     }
 }
Beispiel #2
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]);
 }