Commit 0f466bf5 authored by Shakarim Sapa's avatar Shakarim Sapa

- Добавлен метод update(lessons);

- Добавлено отображение update(lessons);
parent a9ab8436
......@@ -76,6 +76,28 @@ class LessonAdminController extends AdminController {
);
}
/**
* @param $id
* @return string|\yii\web\Response
*/
public function actionUpdate($id){
/** @var AnalyticsSchoolLesson $model */
$model = $this->findModel($id);
if ($model->load(\Yii::$app->request->post())) {
if ($model->validate() && $model->save())
return $this->redirect([
'manage'
]);
}
$form = new \common\components\BaseForm('/common/modules/analyticsSchool/forms/LessonForm', $model);
return $this->render(
'update',
[
'form' => $form
]
);
}
/**
* @param $id
* @return AnalyticsSchoolLesson|null
......
<?= $form->out;
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment