1 | <?php |
||
28 | class RedirectPanel extends ActionFilter |
||
29 | { |
||
30 | /** |
||
31 | * @var string a list of actions requiring redirect to panel |
||
32 | */ |
||
33 | public $actions = ''; |
||
34 | |||
35 | /** |
||
36 | * This method is invoked right before an action is to be executed (after all possible filters.) |
||
37 | * You may override this method to do last-minute preparation for the action. |
||
38 | * @param Action $action the action to be executed |
||
39 | * @return bool whether the action execution should be continued |
||
40 | */ |
||
41 | public function beforeAction($action) |
||
49 | |||
50 | protected function matchAction($action, $names) |
||
51 | { |
||
52 | if ($names === '*') { |
||
53 | return true; |
||
54 | } |
||
55 | |||
56 | return in_array($action->id, StringHelper::explode($names, ',', true, true), true); |
||
57 | } |
||
58 | |||
59 | protected $_module; |
||
60 | |||
61 | public function getModule() |
||
69 | } |
||
70 |