public function actionTypeCreate() { $model = new ProductLinkType(); if (($data = Yii::app()->getRequest()->getPost('ProductLinkType')) !== null) { $model->setAttributes($data); if ($model->save()) { Yii::app()->user->setFlash(yupe\widgets\YFlashMessages::SUCCESS_MESSAGE, Yii::t('StoreModule.store', 'Record was created!')); $this->redirect((array) Yii::app()->getRequest()->getPost('submit-type', ['typeIndex'])); } } $this->render('index_type', ['model' => $model]); }