/** * Initializes the widget. * If you override this method, make sure you call the parent implementation first. */ public function init() { if ($this->hasModel() && !isset($this->options['id'])) { $this->options['id'] = Html::getInputId($this->model, $this->attribute); } parent::init(); }
public function init() { parent::init(); if (!ArrayHelper::keyExists('url', $this->clientOptions)) { throw \yii\base\InvalidConfigException('Url key is missing in clientOptions'); } }
protected function registerWidget($name = null, $id = null) { if ($name === null) { $name = $this->_getUnnamespacedClassName(); } $this->_registerBundle(); parent::registerWidget($name, $id); }
/** * @inheritdoc */ public function init() { parent::init(); if ($this->model === null) { throw new InvalidConfigException('The "model" property must be set.'); } $this->initOptions(); echo Html::beginTag('div', $this->options) . "\n"; }
/** * @throws \yii\base\InvalidConfigException */ public function init() { parent::init(); // Make sure we have an id to bind the slider to if (empty($this->id)) { throw new \yii\base\InvalidConfigException('The id is required and cannot be empty.'); } $this->registerToView(); }
/** * Initializes the widget. * If you override this method, make sure you call the parent implementation first. */ public function init() { if (!$this->hasModel() && $this->name === null) { throw new InvalidConfigException("Either 'name', or 'model' and 'attribute' properties must be specified."); } if ($this->hasModel() && !isset($this->options['id'])) { $this->options['id'] = Html::getInputId($this->model, $this->attribute); } parent::init(); }
public function init() { parent::init(); if ($this->inView and is_array($this->watchers)) { echo Html::beginTag('ul', ['class' => 'list-unstyled']); foreach ($this->watchers as $uid => $username) { echo Html::beginTag('li'); echo Html::a($username, ['/client/client/view', 'id' => $uid]); echo Html::endTag('li'); } echo Html::endTag('ul'); } }
/** * Initializes the widget. */ public function init() { parent::init(); echo Html::beginTag('div', $this->options) . "\n"; }
public function init() { parent::init(); echo Html::tag('span', $this->label, ['class' => 'label label-' . $this->cssClasses()]); }
/** * Initializes the widget. */ public function init() { parent::init(); if ($this->mode === self::MODE_BEGIN) { echo Html::beginTag('div', $this->options) . "\n"; } }
public function run() { parent::run(); echo Html::tag($this->tagName, $this->encodeLabel ? Html::encode($this->label) : $this->label, $this->options); $this->registerAjaxScript(); }