/** * @inheritdoc */ public function init() { parent::init(); if (empty($this->options['id'])) { $this->options['id'] = $this->getId(); } }
public function init() { parent::init(); if (is_array($this->items) and count($this->items)) { foreach ($this->items as $item) { $this->content .= $item; } } else { throw new InvalidParamException(); } }
/** * Initializes the widget */ public function init() { parent::init(); Html::addCssClass($this->options, 'sortable ' . $this->type); if ($this->connected) { Html::addCssClass($this->options, 'connected'); $this->pluginOptions['connectWith'] = '.connected'; } if ($this->showHandle) { $this->pluginOptions['handle'] = '.handle'; } else { Html::addCssClass($this->options, 'cursor-move'); } if ($this->hasDisabledItem() && empty($this->pluginOptions['items'])) { $this->pluginOptions['items'] = ':not(.disabled)'; } $this->registerAssets(); echo Html::beginTag('ul', $this->options); }
/** * Initializes the widget * * @throws \yii\base\InvalidConfigException */ public function init() { parent::init(); if (empty($this->items) || !is_array($this->items)) { throw new InvalidConfigException("The 'items' property must be set as required in '\\yii\\bootstrap\\Dropdown'."); } $this->initOptions(); $this->registerAssets(); echo Html::beginTag($this->_targetTag, $this->options) . PHP_EOL; }
/** * @inheritdoc */ public function init() { if (empty($this->model) || !$this->model instanceof Model) { throw new InvalidConfigException("You must enter a valid 'model' for DynaGridDetail."); } parent::init(); $this->_module = Config::initModule(Module::classname()); $this->_requestSubmit = $this->options['id'] . '-dynagrid-detail'; $this->_isSubmit = !empty($_POST[$this->_requestSubmit]) && $this->model->load(Yii::$app->request->post()) && $this->model->validate(); $this->registerAssets(); }
/** * Initializes the widget */ public function init() { parent::init(); $this->initOptions(); }
/** * @inheritdoc */ public function init() { $this->initTreeView(); parent::init(); $this->initOptions(); $this->registerAssets(); }
/** * Initializes the widget */ public function init() { parent::init(); $this->initOptions(); echo $this->renderToggleButton() . "\n"; echo Html::beginTag('div', $this->options) . "\n"; echo Html::tag('div', '', $this->arrowOptions); echo $this->renderHeader() . "\n"; echo $this->renderBodyBegin() . "\n"; }
/** * @inherit doc */ public function init() { $this->validateSourceData(); $this->_module = Config::initModule(Module::classname()); $this->initSelectedNode(); if (empty($this->emptyNodeMsg)) { $this->emptyNodeMsg = Yii::t('kvtree', 'No valid tree nodes are available for display. Use toolbar buttons to add tree nodes.'); } parent::init(); }
/** * Initializes the widget */ public function init() { if (null != $this->url) { $this->pluginOptions['url'] = $this->url; } else { $this->pluginOptions['url'] = Url::to([$this->view->context->id . '/nodeMove']); } parent::init(); $this->registerAssets(); Html::addCssClass($this->options, 'dd'); echo Html::beginTag('div', $this->options); if (null != $this->query) { $this->items = $this->prepareItems($this->query); } if (count($this->items) === 0) { echo Html::tag('div', '', ['class' => 'dd-empty']); } }
/** * @inheritdoc */ public function init() { $this->initTreeView(); parent::init(); }
/** * Initializes the widget */ public function init() { parent::init(); }
/** * @inheritdoc */ public function init() { parent::init(); $this->initWidget(); }