1 | <?php |
||
17 | class BaseController extends Controller |
||
18 | { |
||
19 | /** |
||
20 | * @var array list of disabled actions |
||
21 | */ |
||
22 | public $disabledActions = []; |
||
23 | |||
24 | /** |
||
25 | * @var string the running command name |
||
26 | */ |
||
27 | protected $command; |
||
28 | |||
29 | /** |
||
30 | * @inheritdoc |
||
31 | */ |
||
32 | public function behaviors(): array |
||
41 | |||
42 | /** |
||
43 | * Before action event |
||
44 | * |
||
45 | * @param \yii\base\Action $action |
||
46 | * |
||
47 | * @return bool |
||
48 | */ |
||
49 | public function beforeAction($action): bool |
||
67 | |||
68 | /** |
||
69 | * After action event |
||
70 | * |
||
71 | * @param \yii\base\Action $action |
||
72 | * @param mixed $result |
||
73 | * |
||
74 | * @return mixed |
||
75 | */ |
||
76 | public function afterAction($action, $result) |
||
84 | |||
85 | /** |
||
86 | * Check whether the current action is disabled |
||
87 | * |
||
88 | * @param $id string action id |
||
89 | * |
||
90 | * @throws InvalidConfigException |
||
91 | * |
||
92 | * @return bool |
||
93 | */ |
||
94 | protected function isDisabledAction($id): bool |
||
106 | } |
||
107 |