Update::init()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace yiicod\systemparams\actions\backend;
4
5
use Yii;
6
use yii2mod\editable\EditableAction;
7
use yiicod\systemparams\SystemParamsService;
8
9
/**
10
 * Class UpdateAction
11
 *
12
 * @package yiicod\systemparams\actions\backend\systemParams
13
 */
14
class Update extends EditableAction
15
{
16
    /**
17
     * Init action
18
     */
19
    public function init()
20
    {
21
        $this->modelClass = Yii::$app->get('systemparams')->modelMap['systemParam']['class'];
22
        parent::init();
23
    }
24
25
    /**
26
     * After action runs
27
     */
28
    public function afterRun()
29
    {
30
        SystemParamsService::flushCache();
31
    }
32
}
33