Ejemplo n.º 1
0
 public function init()
 {
     parent::init();
     $this->initOptions();
     echo Html::beginTag('div', $this->options) . "\n";
     echo $this->beginBody() . "\n";
 }
Ejemplo n.º 2
0
 public function init()
 {
     parent::init();
     UI::addCssClasses($this->options, ['ui', 'progress']);
     if ($this->percent !== null) {
         $this->clientOptions['percent'] = $this->percent;
     }
     if ($this->indicating) {
         UI::addCssClasses($this->options, [self::TYPE_INDICATING]);
     }
     if ($this->inverted) {
         UI::addCssClasses($this->options, [self::TYPE_INVERTED]);
     }
     if ($this->attached) {
         UI::addCssClasses($this->options, [$this->attached]);
     }
     if ($this->size) {
         UI::addCssClasses($this->options, [$this->size]);
     }
     if ($this->state) {
         UI::addCssClasses($this->options, [$this->state]);
     }
     if ($this->color) {
         UI::addCssClasses($this->options, [$this->color]);
     }
 }
Ejemplo n.º 3
0
 public function init()
 {
     parent::init();
     UI::addCssClasses($this->options, ['ui', 'shape']);
     if ($this->type) {
         UI::addCssClasses($this->options, [$this->type]);
     }
 }
Ejemplo n.º 4
0
 public function init()
 {
     parent::init();
     $this->initOptions();
     echo $this->renderToggleButton() . "\n";
     echo Html::beginTag('div', $this->options) . "\n";
     echo $this->renderHeader() . "\n";
     echo $this->beginBody() . "\n";
 }
Ejemplo n.º 5
0
 public function run()
 {
     parent::run();
     if ($this->toggleButton !== false) {
         echo $this->renderToggleButton();
     }
     $this->registerPlugin('sidebar');
     echo Html::tag('div', $this->content, $this->options);
 }
Ejemplo n.º 6
0
 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 = Yii::$app->getRequest()->getQueryParams();
     }
 }
Ejemplo n.º 7
0
 public function init()
 {
     parent::init();
     if ($this->context === null) {
         throw new InvalidConfigException('"context" cannot be null.');
     }
     $this->clientOptions['context'] = $this->context;
     $this->registerPlugin('sticky');
     UI::addCssClasses($this->options, ['ui', 'sticky']);
     echo Html::beginTag('div', $this->options);
 }
Ejemplo n.º 8
0
 public function init()
 {
     parent::init();
     UI::addCssClasses($this->options, ['ui', 'accordion']);
     if ($this->styled) {
         UI::addCssClasses($this->options, [self::TYPE_STYLED]);
     }
     if ($this->fluid) {
         UI::addCssClasses($this->options, [self::TYPE_FLUID]);
     }
     if ($this->vertical) {
         UI::addCssClasses($this->options, [self::TYPE_VERTICAL]);
     }
 }
Ejemplo n.º 9
0
 public function init()
 {
     parent::init();
     UI::addCssClasses($this->options, ['ui', $this->ratio, 'embed']);
     $this->options['data']['source'] = $this->source;
     $this->options['data']['id'] = $this->videoId;
     if ($this->placeholder) {
         $this->options['data']['placeholder'] = $this->placeholder;
     }
     if ($this->url) {
         $this->options['data']['url'] = $this->url;
     }
     if ($this->icon) {
         $this->options['data']['icon'] = $this->icon;
     }
 }
Ejemplo n.º 10
0
 public function init()
 {
     parent::init();
     UI::addCssClasses($this->options, ['ui', 'rating']);
     if ($this->max <= 0) {
         throw new InvalidConfigException("Max rating number cannot be less or equal to 0.");
     }
     if ($this->rating !== null) {
         if ($this->rating > $this->max) {
             throw new InvalidConfigException("Rating number cannot be higher than Max rating number.");
         }
         $this->options['data-rating'] = $this->rating;
     }
     $this->options['data-max-rating'] = $this->max;
     if ($this->type) {
         UI::addCssClasses($this->options, [$this->type]);
     }
     if ($this->size) {
         UI::addCssClasses($this->options, [$this->size]);
     }
 }
Ejemplo n.º 11
0
 public function init()
 {
     parent::init();
     $this->normalizeItems();
 }