1 | <?php |
||
25 | abstract class AbstractController extends Controller |
||
26 | { |
||
27 | /** |
||
28 | * The index view template path |
||
29 | */ |
||
30 | const TEMPLATE_BASE = 'hubspot' . '/_cp'; |
||
31 | |||
32 | /******************************************* |
||
33 | * BASE PATHS |
||
34 | *******************************************/ |
||
35 | |||
36 | /** |
||
37 | * @return string |
||
38 | */ |
||
39 | protected function getBaseActionPath(): string |
||
43 | |||
44 | /** |
||
45 | * @return string |
||
46 | */ |
||
47 | protected function getBaseCpPath(): string |
||
51 | |||
52 | /** |
||
53 | * @param string $endpoint |
||
54 | * @return string |
||
55 | */ |
||
56 | protected function getBaseContinueEditingUrl(string $endpoint = ''): string |
||
60 | |||
61 | /******************************************* |
||
62 | * CONNECTIONS |
||
63 | *******************************************/ |
||
64 | |||
65 | /** |
||
66 | * @return array |
||
67 | */ |
||
68 | protected function getConnections(): array |
||
72 | |||
73 | /** |
||
74 | * @return Connection|null |
||
75 | */ |
||
76 | protected function findDefaultConnection() |
||
83 | |||
84 | /** |
||
85 | * @return Connection|null |
||
86 | */ |
||
87 | protected function findActiveConnection() |
||
109 | |||
110 | /** |
||
111 | * @return DynamicModel |
||
112 | */ |
||
113 | protected function invalidConnectionModel(): DynamicModel |
||
126 | |||
127 | /******************************************* |
||
128 | * VARIABLES |
||
129 | *******************************************/ |
||
130 | |||
131 | /** |
||
132 | * @inheritdoc |
||
133 | */ |
||
134 | protected function baseVariables(array &$variables = []) |
||
170 | |||
171 | /******************************************* |
||
172 | * UPSERT VARIABLES |
||
173 | *******************************************/ |
||
174 | |||
175 | /** |
||
176 | * @param array $variables |
||
177 | */ |
||
178 | protected function insertVariables(array &$variables) |
||
189 | } |
||
190 |