Beispiel #1
0
 /**
  * Initializes the widget.
  * This renders the form open tag.
  */
 public function init()
 {
     if ($classes = ArrayHelper::getValue($this->options, 'class')) {
         $this->options = ArrayHelper::merge($this->options, ['class' => $classes . ' sx-form-admin']);
     } else {
         $this->options = ArrayHelper::merge($this->options, ['class' => 'sx-form-admin']);
     }
     if ($this->usePjax) {
         Pjax::begin(ArrayHelper::merge(['id' => 'sx-pjax-form-' . $this->id], $this->pjaxOptions));
         $this->options = ArrayHelper::merge($this->options, ['data-pjax' => true]);
         echo \skeeks\cms\modules\admin\widgets\Alert::widget();
     }
     parent::init();
 }
 public function init()
 {
     parent::init();
     echo \yii\helpers\Html::hiddenInput("sx-model-value", $this->modelForm->id);
     echo \yii\helpers\Html::hiddenInput("sx-model", $this->modelForm->className());
 }