/** * @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 run() { $this->saveDetail(); $title = Yii::t('kvdynagrid', "Save / Edit Grid {title}", ['title' => ucfirst($this->model->category)]); $icon = "<i class='glyphicon glyphicon-{$this->model->category}'></i> "; Modal::begin(['header' => '<h3 class="modal-title">' . $icon . $title . '</h3>', 'toggleButton' => $this->toggleButton, 'options' => ['id' => $this->id]]); echo $this->render($this->_module->settingsView, ['model' => $this->model, 'requestSubmit' => $this->_requestSubmit]); Modal::end(); parent::run(); }
/** * Initializes the widget */ public function init() { parent::init(); $this->initOptions(); }
/** * @inheritdoc */ public static function widget($config = []) { $config = self::getConfig($config); return parent::widget($config); }
/** * 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"; }
/** * 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']); } }
/** * Initializes the widget */ public function init() { parent::init(); }
/** * @inheritdoc */ public function init() { parent::init(); $this->initWidget(); }