@@ 111-122 (lines=12) @@ | ||
108 | * @param integer $id |
|
109 | * @return mixed |
|
110 | */ |
|
111 | public function actionUpdate($id) |
|
112 | { |
|
113 | $model = $this->findModel($id); |
|
114 | ||
115 | if ($model->load(Yii::$app->request->post()) && $model->save()) { |
|
116 | Yii::$app->getSession()->setFlash('success', Yii::t('feedback', 'Information saved.')); |
|
117 | return $this->redirect(['index']); |
|
118 | } |
|
119 | return $this->render('update', [ |
|
120 | 'model' => $model, |
|
121 | ]); |
|
122 | } |
|
123 | ||
124 | /** |
|
125 | * Finds the Feedback model based on its primary key value. |
@@ 73-84 (lines=12) @@ | ||
70 | * @param integer $id |
|
71 | * @return mixed |
|
72 | */ |
|
73 | public function actionUpdate($id) |
|
74 | { |
|
75 | $model = $this->findModel($id); |
|
76 | ||
77 | if ($model->load(Yii::$app->request->post()) && $model->save()) { |
|
78 | Yii::$app->getSession()->setFlash('success', Yii::t('mailTemplate', 'Information saved.')); |
|
79 | return $this->redirect(['view', 'id' => $model->id]); |
|
80 | } |
|
81 | return $this->render('update', [ |
|
82 | 'model' => $model, |
|
83 | ]); |
|
84 | } |
|
85 | ||
86 | /** |
|
87 | * Finds the MailTemplate model based on its primary key value. |