Exemple #1
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     $this->initOptions();
     echo Html::beginTag('div', $this->options) . "\n";
     echo $this->renderBodyBegin() . "\n";
 }
Exemple #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');
     }
 }
Exemple #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";
 }
Exemple #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);
 }
Exemple #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";
 }
Exemple #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');
     }
 }
Exemple #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";
 }
 /**
  * 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";
 }
Exemple #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";
     }
 }
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     Html::addCssClass($this->options, 'uk-scrollable-box');
     echo Html::beginTag('div', $this->options) . "\n";
 }
Exemple #12
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     echo $this->renderToggleButton();
 }
Exemple #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);
 }
Exemple #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');
 }
Exemple #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');
 }
Exemple #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');
     }
 }
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     $this->initOptions();
     echo Html::beginTag('a', $this->options) . "\n";
 }
Exemple #18
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     $this->initOptions();
 }
Exemple #19
0
 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     Html::addCssClass($this->options, 'uk-overflow-container');
     echo Html::beginTag('div', $this->options) . "\n";
 }
Exemple #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');
     }
 }