public function run() { parent::run(); if (!empty($this->ajaxOptions)) { $this->registerAjaxScript(); } }
/** * 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]); }