1 | <?php |
||
11 | class TokensController extends AbstractViewController |
||
12 | { |
||
13 | /** |
||
14 | * The index view template path |
||
15 | */ |
||
16 | const TEMPLATE_INDEX = AbstractViewController::TEMPLATE_BASE . '/tokens'; |
||
17 | |||
18 | /** |
||
19 | * The upsert view template path |
||
20 | */ |
||
21 | const TEMPLATE_UPSERT = self::TEMPLATE_INDEX . '/upsert'; |
||
22 | |||
23 | /** |
||
24 | * @param $provider |
||
25 | * @return \yii\web\Response |
||
26 | * @throws \ReflectionException |
||
27 | * @throws \flipbox\craft\ember\exceptions\RecordNotFoundException |
||
28 | * @throws \yii\base\InvalidConfigException |
||
29 | */ |
||
30 | public function actionIndex($provider) |
||
53 | |||
54 | /** |
||
55 | * @param $provider |
||
56 | * @param $identifier |
||
57 | * @param Token|null $token |
||
58 | * @return \yii\web\Response |
||
59 | * @throws \ReflectionException |
||
60 | * @throws \flipbox\craft\ember\exceptions\RecordNotFoundException |
||
61 | * @throws \yii\base\InvalidConfigException |
||
62 | */ |
||
63 | public function actionUpsert($provider, $identifier, Token $token = null) |
||
97 | |||
98 | /******************************************* |
||
99 | * PATHS |
||
100 | *******************************************/ |
||
101 | |||
102 | /** |
||
103 | * @inheritdoc |
||
104 | */ |
||
105 | protected function getBaseCpPath(): string |
||
110 | |||
111 | /** |
||
112 | * @inheritdoc |
||
113 | */ |
||
114 | protected function getBaseActionPath(): string |
||
118 | |||
119 | |||
120 | /******************************************* |
||
121 | * VARIABLES |
||
122 | *******************************************/ |
||
123 | |||
124 | /** |
||
125 | * @param array $variables |
||
126 | * @param Provider $provider |
||
127 | * @throws \ReflectionException |
||
128 | */ |
||
129 | protected function tokenVariables(array &$variables, Provider $provider) |
||
147 | |||
148 | /** |
||
149 | * @param array $variables |
||
150 | * @param Provider $provider |
||
151 | * @param Token $token |
||
152 | * @throws \ReflectionException |
||
153 | */ |
||
154 | protected function tokenUpdateVariables(array &$variables, Provider $provider, Token $token) |
||
171 | } |
||
172 |