Example #1
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     $this->initOptions();
     echo Html::beginTag('div', $this->options) . "\n";
     echo $this->renderBodyBegin() . "\n";
 }
Example #2
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     Html::addCssClass($this->options, 'uk-dotnav');
     if ($this->isVertical) {
         Html::addCssClass($this->options, 'uk-dotnav-vertical');
     }
 }
Example #3
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     $this->initOptions();
     echo $this->renderToggleButton() . "\n";
     echo Html::beginTag('div', $this->options) . "\n";
     echo Html::beginTag('div', $this->barOptions) . "\n";
 }
Example #4
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     if (!$this->name) {
         throw new InvalidConfigException("The 'name' option is required.");
     }
     Html::addCssClass($this->options, 'uk-icon-' . $this->name);
 }
Example #5
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     $this->initOptions();
     echo Html::beginTag('article', $this->options) . "\n";
     echo $this->renderTitle() . "\n";
     echo $this->renderMeta() . "\n";
     echo $this->renderLead() . "\n";
 }
Example #6
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     $this->clientOptions = false;
     Html::addCssClass($this->options, 'uk-navbar');
     if (empty($this->options['role'])) {
         $this->options['role'] = 'navigation';
     }
     echo Html::beginTag('nav', $this->options);
 }
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     Html::addCssClass($this->options, 'uk-description-list');
     if ($this->isHorizontal) {
         Html::addCssClass($this->options, 'uk-description-list-horizontal');
     }
     if ($this->addLine) {
         if ($this->isHorizontal) {
             throw new InvalidConfigException("The options 'isHorizontal' and 'addLine' of the Description lists component are not combinable with each other.");
         }
         Html::addCssClass($this->options, 'uk-description-list-line');
     }
 }
Example #8
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     if ($this->enableThumbMode) {
         Html::addCssClass($this->thumbOptions, 'uk-thumbnail');
         if (isset($this->thumbOptions['url'])) {
             $url = ArrayHelper::remove($this->thumbOptions, 'url', '');
             $this->thumbOptions = array_merge(['href' => $url], $this->thumbOptions);
         }
         echo Html::beginTag('a', $this->thumbOptions);
     }
     Html::addCssClass($this->options, 'uk-overlay');
     echo Html::beginTag($this->enableThumbMode ? 'div' : $this->tagName, $this->options) . "\n";
 }
Example #9
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     Html::addCssClass($this->options, 'uk-button-group');
     if ($this->checkboxButtons) {
         $this->options = array_merge(['data-uk-button-checkbox' => ''], $this->options);
     }
     if ($this->radioButtons) {
         if ($this->checkboxButtons) {
             throw new InvalidConfigException("Options 'checkboxButtons' and 'radioButtons' cannot be used at the same time.");
         } else {
             $this->options = array_merge(['data-uk-button-radio' => ''], $this->options);
         }
     }
     echo Html::beginTag('div', $this->options) . "\n";
 }
Example #10
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     Html::addCssClass($this->options, 'uk-thumbnail');
     if ($this->tagName !== 'img' || isset($this->caption)) {
         $this->mixMode = true;
     }
     if (isset($this->url)) {
         $this->options = array_merge(['href' => $this->url], $this->options);
         $this->tagName = 'a';
         $this->mixMode = true;
     }
     if ($this->mixMode) {
         echo Html::beginTag($this->tagName, $this->options) . "\n";
     }
 }
Example #11
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     Html::addCssClass($this->options, 'uk-scrollable-box');
     echo Html::beginTag('div', $this->options) . "\n";
 }
Example #12
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     echo $this->renderToggleButton();
 }
Example #13
0
 /**
  * Initializes the widget.
  * If you override this method, make sure you call the parent implementation first.
  */
 public function init()
 {
     parent::init();
     Html::addCssClass($this->options, 'uk-dropdown');
     $this->tagOptions['data-uk-dropdown'] = $this->jsonClientOptions();
     if ($this->navbar) {
         Html::addCssClass($this->options, 'uk-dropdown-navbar');
     } else {
         if ($this->toggleButton !== null) {
             Html::addCssClass($this->tagOptions, 'uk-button-dropdown');
         }
         if ($this->tag) {
             echo Html::beginTag($this->tag, $this->tagOptions) . "\n";
         }
         echo $this->renderToggleButton() . "\n";
     }
     echo Html::beginTag('div', $this->options);
 }
Example #14
0
 /**
  * Initializes the widget.
  * If you override this method, make sure you call the parent implementation first.
  */
 public function init()
 {
     parent::init();
     Html::addCssClass($this->options, 'uk-progress');
 }
Example #15
0
 /**
  * Initializes the widget.
  * If you override this method, make sure you call the parent implementation first.
  */
 public function init()
 {
     parent::init();
     $this->clientOptions = false;
     Html::addCssClass($this->options, 'uk-button');
 }
Example #16
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     if ($this->route === null && Yii::$app->controller !== null) {
         $this->route = Yii::$app->controller->getRoute();
     }
     if ($this->params === null) {
         $this->params = $_GET;
     }
     Html::addCssClass($this->options, $this->navbar ? 'uk-navbar-nav' : 'uk-nav');
     if ($this->offcanvas) {
         if ($this->navbar) {
             throw new InvalidConfigException("Options 'navbar' and 'offcanvas' cannot be used together.");
         }
         Html::addCssClass($this->options, 'uk-nav-offcanvas');
     }
     if ($this->accordion) {
         $this->options['data-uk-nav'] = $this->jsonClientOptions();
     }
     if ($this->showParentIcon) {
         Html::addCssClass($this->options, 'uk-nav-parent-icon');
     }
 }
Example #17
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     $this->initOptions();
     echo Html::beginTag('a', $this->options) . "\n";
 }
Example #18
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     $this->initOptions();
 }
Example #19
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     Html::addCssClass($this->options, 'uk-overflow-container');
     echo Html::beginTag('div', $this->options) . "\n";
 }
Example #20
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     if ($this->route === null && Yii::$app->controller !== null) {
         $this->route = Yii::$app->controller->getRoute();
     }
     if ($this->params === null) {
         $this->params = $_GET;
     }
     Html::addCssClass($this->options, 'uk-subnav');
     if ($this->showPills) {
         Html::addCssClass($this->options, 'uk-subnav-pill');
     }
     if ($this->showLine) {
         Html::addCssClass($this->options, 'uk-subnav-line');
     }
 }