1 | <?php |
||
26 | class TypoScriptService implements SingletonInterface |
||
27 | { |
||
28 | const EXTENSION_CONFIGURATION_PATH = 'config.tx_formz'; |
||
29 | |||
30 | /** |
||
31 | * @var EnvironmentService |
||
32 | */ |
||
33 | protected $environmentService; |
||
34 | |||
35 | /** |
||
36 | * @var ExtbaseTypoScriptService |
||
37 | */ |
||
38 | protected $typoScriptService; |
||
39 | |||
40 | /** |
||
41 | * Storage for the pages configuration. |
||
42 | * |
||
43 | * @var array |
||
44 | */ |
||
45 | protected $configuration = []; |
||
46 | |||
47 | /** |
||
48 | * Returns the TypoScript configuration at the given path (starting from |
||
49 | * Formz configuration root). |
||
50 | * |
||
51 | * @param string $path |
||
52 | * @return mixed |
||
53 | */ |
||
54 | public function getExtensionConfigurationFromPath($path) |
||
62 | |||
63 | /** |
||
64 | * Returns the TypoScript configuration for the given form class name. |
||
65 | * |
||
66 | * @param string $formClassName |
||
67 | * @return array |
||
68 | */ |
||
69 | public function getFormConfiguration($formClassName) |
||
77 | |||
78 | /** |
||
79 | * Returns the full Formz TypoScript configuration, but without the `forms` |
||
80 | * key. |
||
81 | * |
||
82 | * @return array |
||
83 | */ |
||
84 | public function getFormzConfiguration() |
||
91 | |||
92 | /** |
||
93 | * This function will fetch the extension TypoScript configuration, and |
||
94 | * store it in cache for further usage. |
||
95 | * |
||
96 | * The configuration array is not stored in cache if the configuration |
||
97 | * property `settings.typoScriptIncluded` is not found. |
||
98 | * |
||
99 | * @return array |
||
100 | */ |
||
101 | protected function getExtensionConfiguration() |
||
121 | |||
122 | /** |
||
123 | * Returns the full TypoScript configuration, based on the context of the |
||
124 | * current request. |
||
125 | * |
||
126 | * @return array |
||
127 | */ |
||
128 | protected function getFullConfiguration() |
||
144 | |||
145 | /** |
||
146 | * @return array |
||
147 | */ |
||
148 | protected function getFrontendTypoScriptConfiguration() |
||
152 | |||
153 | /** |
||
154 | * @return array |
||
155 | */ |
||
156 | protected function getBackendTypoScriptConfiguration() |
||
163 | |||
164 | /** |
||
165 | * Returns a unique hash for the context of the current request, depending |
||
166 | * on whether the request comes from frontend or backend. |
||
167 | * |
||
168 | * @return string |
||
169 | */ |
||
170 | protected function getContextHash() |
||
174 | |||
175 | /** |
||
176 | * @param EnvironmentService $environmentService |
||
177 | */ |
||
178 | public function injectEnvironmentService(EnvironmentService $environmentService) |
||
182 | |||
183 | /** |
||
184 | * @param ExtbaseTypoScriptService $typoScriptService |
||
185 | */ |
||
186 | public function injectTypoScriptService(ExtbaseTypoScriptService $typoScriptService) |
||
190 | } |
||
191 |