/** * @inheritdoc */ protected function load($model, $request) { if ($result = parent::load($model, $request)) { $model->uploadedFiles = \yii\web\UploadedFile::getInstances($model, 'uploadedFiles'); } return $result; }
/** * @inheritdoc */ protected function initModel($id) { $model = parent::initModel($id); $model->parser_class = $this->modelClass; if (!Yii::$app->getRequest()->getIsPost() && is_null($model->columnsOrder)) { $model->columnsOrder = json_encode($model->getDefaultColumns()); } return $model; }