Conditions | 3 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | public function actionIndex() |
||
23 | { |
||
24 | // init settings model |
||
25 | $model = new FormSettings($this->getConfigs()); |
||
26 | |||
27 | // check if request is submited |
||
28 | if ($model->send() && $model->validate()) { |
||
29 | $this->setConfigs($model->getResult()); |
||
30 | App::$Session->getFlashBag()->add('success', __('Settings is successful updated')); |
||
31 | } |
||
32 | |||
33 | // render viewer |
||
34 | return App::$View->render('index', [ |
||
35 | 'model' => $model->export() |
||
36 | ]); |
||
37 | } |
||
38 | } |