1 | <?php |
||
26 | class RawFilter extends ActionFilter |
||
27 | { |
||
28 | /** |
||
29 | * @var array this property defines the transformers for each action. |
||
30 | * Each action that should only support one transformer. |
||
31 | * |
||
32 | * You can use `'*'` to stand for all actions. When an action is explicitly |
||
33 | * specified, it takes precedence over the specification given by `'*'`. |
||
34 | * |
||
35 | * For example, |
||
36 | * |
||
37 | * ```php |
||
38 | * [ |
||
39 | * 'create' => $view, |
||
40 | * 'update' => $view, |
||
41 | * 'delete' => $view, |
||
42 | * '*' => $view, |
||
43 | * ] |
||
44 | * ``` |
||
45 | */ |
||
46 | public $actions = []; |
||
47 | |||
48 | /** |
||
49 | * @var array|ViewInterface |
||
50 | */ |
||
51 | public $view; |
||
52 | |||
53 | /** |
||
54 | * @param \yii\base\Action $action |
||
55 | * @param mixed $result |
||
56 | * @return mixed|\Twig_Markup |
||
57 | */ |
||
58 | public function afterAction($action, $result) |
||
66 | |||
67 | /** |
||
68 | * @param $data |
||
69 | * @return \Twig_Markup |
||
70 | */ |
||
71 | protected function renderTemplate($data) |
||
81 | |||
82 | /** |
||
83 | * @return ViewInterface|array|null |
||
84 | * @throws Exception |
||
85 | */ |
||
86 | protected function findView() |
||
103 | |||
104 | /** |
||
105 | * @param $view |
||
106 | * @return ViewInterface |
||
107 | * @throws Exception |
||
108 | */ |
||
109 | protected function resolveView($view): ViewInterface |
||
127 | } |
||
128 |