示例#1
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     if (empty($this->options['id'])) {
         $this->options['id'] = $this->getId();
     }
 }
示例#2
0
文件: Concat.php 项目: nagser/base
 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();
     }
 }
示例#3
0
 /**
  * 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;
 }
示例#5
0
 /**
  * @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();
 }
示例#6
0
 /**
  * Initializes the widget
  */
 public function init()
 {
     parent::init();
     $this->initOptions();
 }
示例#7
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     $this->initTreeView();
     parent::init();
     $this->initOptions();
     $this->registerAssets();
 }
示例#8
0
 /**
  * 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();
 }
示例#10
0
 /**
  * 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']);
     }
 }
示例#11
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     $this->initTreeView();
     parent::init();
 }
示例#12
0
 /**
 * Initializes the widget
 */
 public function init()
 {
     parent::init();
 }
示例#13
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     $this->initWidget();
 }