Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function settings(): ?string |
||
27 | { |
||
28 | $model = new FormSettings($this->getConfigs()); |
||
|
|||
29 | |||
30 | if ($model->send()) { |
||
31 | if ($model->validate()) { |
||
32 | $this->setConfigs($model->getAllProperties()); |
||
33 | App::$Session->getFlashBag()->add('success', __('Settings is successful updated')); |
||
34 | $this->response->redirect('profile/index'); |
||
35 | } else { |
||
36 | App::$Session->getFlashBag()->add('error', __('Form validation is failed')); |
||
37 | } |
||
38 | } |
||
39 | |||
40 | return $this->view->render('profile/settings', [ |
||
41 | 'model' => $model |
||
42 | ]); |
||
44 | } |