/** * Creates a new model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new ContentTemplateWidget(); if ($model->load(Yii::$app->request->post()) && $model->convertPositionIds() && $model->save()) { return $this->redirect($this->getRedirectPage('create', $model)); } return $this->renderIsAjax('create', compact('model')); }