| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 47 | public function actionSettings() |
||
| 48 | { |
||
| 49 | $model = new FormSettings($this->getConfigs()); |
||
| 50 | |||
| 51 | if ($model->send()) { |
||
| 52 | if ($model->validate()) { |
||
| 53 | $this->setConfigs($model->getAllProperties()); |
||
| 54 | App::$Session->getFlashBag()->add('success', __('Settings is successful updated')); |
||
| 55 | $this->response->redirect('profile/index'); |
||
| 56 | } else { |
||
| 57 | App::$Session->getFlashBag()->add('error', __('Form validation is failed')); |
||
| 58 | } |
||
| 59 | } |
||
| 60 | |||
| 61 | return $this->view->render('profile/settings', [ |
||
| 62 | 'model' => $model |
||
| 63 | ]); |
||
| 66 |