Conditions | 1 |
Paths | 1 |
Total Lines | 27 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
33 | |||
34 | use Profile\ActionFieldUpdate { |
||
35 | profileFieldUpdate as actionFieldupdate; |
||
36 | } |
||
37 | |||
38 | use Profile\ActionFieldDelete { |
||
39 | profileFieldDelete as actionFielddelete; |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * Show profiles settings |
||
44 | * @return string |
||
45 | * @throws \Ffcms\Core\Exception\SyntaxException |
||
46 | */ |
||
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 | |||
66 |