/** * @inheritdoc */ public function init() { parent::init(); $this->initOptions(); echo Ui::beginTag('div', $this->options) . "\n"; echo $this->renderBodyBegin() . "\n"; }
/** * @inheritdoc * @throws InvalidConfigException */ public function init() { if (!$this->hasModel() && $this->name === null) { throw new InvalidConfigException("Either 'name', or 'model' and 'attribute' properties must be specified."); } if (!isset($this->options['id'])) { $this->options['id'] = $this->hasModel() ? Html::getInputId($this->model, $this->attribute) : $this->getId(); } parent::init(); }
/** * Initializes the widget. * If you override this method, make sure you call the parent implementation first. */ public function init() { parent::init(); if ($this->percent !== null) { $this->clientOptions['percent'] = $this->percent; } if (!empty($this->size)) { Html::addCssClass($this->options, $this->size); } Html::addCssClass($this->barOptions, 'bar'); Html::addCssClass($this->options, 'progress'); }
/** * @inheritdoc * @throws InvalidConfigException */ public function init() { parent::init(); if ($this->context === null) { throw new InvalidConfigException('"context" cannot be null.'); } if ($this->content === null) { throw new InvalidConfigException('"content" cannot be null.'); } $this->clientOptions['context'] = $this->context; $this->selector = '.ui.sticky'; Html::addCssClass($this->options, 'rail'); }
/** * @throws InvalidConfigException */ public function init() { if ($this->image === null) { throw new InvalidConfigException('"image" cannot be null.'); } if ($this->source === null) { throw new InvalidConfigException('"source" cannot be null.'); } if ($this->videoId === null && $this->url === null) { throw new InvalidConfigException('"videoId" or "url" must be set. Both cannot be null.'); } $this->clientOptions['source'] = $this->source; $this->clientOptions['id'] = $this->videoId; $this->clientOptions['url'] = $this->url; Html::addCssClass($this->options, 'video'); parent::init(); }
/** * @inheritdoc * @throws InvalidConfigException */ public function init() { 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 (!empty($this->size)) { Html::addCssClass($this->options, $this->size); } Html::addCssClass($this->options, 'rating'); parent::init(); }
/** * @ineritdoc */ public function init() { parent::init(); Html::addCssClass($this->options, 'breadcrumb'); }
/** * Initializes the widget. */ public function init() { parent::init(); $this->initOptions(); echo $this->renderToggleButton() . "\n"; echo Html::beginTag('div', $this->options) . "\n"; echo $this->renderHeader() . "\n"; echo $this->renderBodyBegin() . "\n"; }
/** * Initializes the widget. */ public function init() { parent::init(); Html::addCssClass($this->options, 'accordion'); }
/** * @inheritdoc */ public function init() { parent::init(); Html::addCssClass($this->options, 'shape'); Html::addCssClass($this->sidesOptions, 'sides'); }
/** * 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, 'dropdown'); Html::addCssClass($this->itemsOptions, 'menu'); }