Example #1
0
 /**
  * (non-PHPdoc)
  * @see \kartik\grid\GridView::init()
  */
 public function init()
 {
     if (!isset($this->templateName)) {
         throw InvalidConfigException("Property tamplateName need to be set.");
     }
     $this->template_name = $this->templateName;
     $this->initTemplate();
     $this->prepareColumns();
     $this->prepareToolBar();
     $this->pjax = true;
     $this->pjaxSettings['options'] = ['id' => 'flexible-grid-pjax'];
     parent::init();
     $this->_module = Config::initModule(Module::classname());
 }
Example #2
0
 /**
  * (non-PHPdoc)
  * @see \yii\widgets\ActiveForm::init()
  */
 public function init()
 {
     Pjax::begin(['id' => 'flexform-widget-whole']);
     Pjax::begin(['id' => 'flexform-widget']);
     parent::init();
     if (!isset($this->formModel)) {
         throw new InvalidConfigException("The \$formModel must be setup.");
     }
     $this->_module = Config::initModule(Module::classname());
     $this->modelClass = (new \ReflectionClass($this->formModel->className()))->getShortName();
     $this->template_name = $this->modelClass;
     $this->initTemplate(false);
     $this->prepareModel();
 }