Commit e27b09d3 authored by Shakarim Sapa's avatar Shakarim Sapa

- Добавлен метод для создания урока

parent 95859ca9
......@@ -42,4 +42,21 @@ class LessonAdminController extends AdminController {
]
);
}
public function actionCreate(){
$model = new AnalyticsSchoolLesson();
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(
'create',
[
'form' => $form
]
);
}
}
\ 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