1 | <?php |
||
13 | class TokensController extends AbstractViewController |
||
14 | { |
||
15 | /** |
||
16 | * The index view template path |
||
17 | */ |
||
18 | const TEMPLATE_INDEX = AbstractViewController::TEMPLATE_BASE . '/tokens'; |
||
19 | |||
20 | /** |
||
21 | * The index view template path |
||
22 | */ |
||
23 | const TEMPLATE_INSERT = self::TEMPLATE_INDEX . '/index'; |
||
24 | |||
25 | /** |
||
26 | * The upsert view template path |
||
27 | */ |
||
28 | const TEMPLATE_UPSERT = self::TEMPLATE_INDEX . '/upsert'; |
||
29 | |||
30 | /** |
||
31 | * @param int|string $provider |
||
32 | * @return \yii\web\Response |
||
33 | * @throws \flipbox\ember\exceptions\NotFoundException |
||
34 | * @throws \yii\base\InvalidConfigException |
||
35 | */ |
||
36 | public function actionIndex($provider) |
||
59 | |||
60 | /** |
||
61 | * @param int|string $provider |
||
62 | * @param int|string $identifier |
||
63 | * @param Token|null $token |
||
64 | * @return \yii\web\Response |
||
65 | * @throws \flipbox\ember\exceptions\NotFoundException |
||
66 | * @throws \yii\base\InvalidConfigException |
||
67 | */ |
||
68 | public function actionUpsert($provider, $identifier, Token $token = null) |
||
117 | |||
118 | /** |
||
119 | * @param Token $token |
||
120 | * @return array |
||
121 | */ |
||
122 | protected function availableTokenEnvironments(Token $token): array |
||
129 | |||
130 | /******************************************* |
||
131 | * PATHS |
||
132 | *******************************************/ |
||
133 | |||
134 | /** |
||
135 | * @inheritdoc |
||
136 | */ |
||
137 | protected function getBaseCpPath(): string |
||
142 | |||
143 | /** |
||
144 | * @inheritdoc |
||
145 | */ |
||
146 | protected function getBaseActionPath(): string |
||
150 | |||
151 | |||
152 | /******************************************* |
||
153 | * VARIABLES |
||
154 | *******************************************/ |
||
155 | |||
156 | /** |
||
157 | * @param array $variables |
||
158 | * @param Provider $provider |
||
159 | */ |
||
160 | protected function tokenVariables(array &$variables, Provider $provider) |
||
178 | |||
179 | /** |
||
180 | * @param array $variables |
||
181 | * @param Provider $provider |
||
182 | */ |
||
183 | protected function tokenUpdateVariables(array &$variables, Provider $provider, Token $token) |
||
200 | } |
||
201 |