Esempio n. 1
0
 /**
  * Creates a new LanguageTranslate model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  * @return mixed
  */
 public function actionCreate()
 {
     $model = new LanguageTranslate();
     if (($id = Yii::$app->request->get('id')) !== null) {
         $model->id = $id;
     }
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         if (Yii::$app->request->post('submit-type') == 'continue') {
             return $this->redirect(['update', 'id' => $model->id, 'language' => $model->language]);
         } else {
             return $this->redirect(['index']);
         }
     } else {
         return $this->render('create', ['model' => $model]);
     }
 }