/** * Creates a new Action model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new Action(); if ($model->load(Yii::$app->request->post()) && $model->validate()) { $model->data_structure = HelperData::dataTrim($model->data_structure); $model->data_structure = HelperData::dataImplodeReturn($model->data_structure); $model->save(false); return $this->redirect(['view', 'id' => $model->id]); } else { $model->data_structure = HelperData::dataExplodeReturn($model->data_structure); return $this->render('create', ['model' => $model]); } }