1 | <?php |
||
23 | class ContextService implements SingletonInterface |
||
24 | { |
||
25 | use ExtendedFacadeInstanceTrait; |
||
26 | |||
27 | /** |
||
28 | * @var EnvironmentService |
||
29 | */ |
||
30 | protected $environmentService; |
||
31 | |||
32 | /** |
||
33 | * @var TypoScriptService |
||
34 | */ |
||
35 | protected $typoScriptService; |
||
36 | |||
37 | /** |
||
38 | * Returns a unique hash for the context of the current request, depending |
||
39 | * on whether the request comes from frontend or backend. |
||
40 | * |
||
41 | * @return string |
||
42 | */ |
||
43 | public function getContextHash() |
||
49 | |||
50 | /** |
||
51 | * Returns the current language key. |
||
52 | * |
||
53 | * @return string |
||
54 | */ |
||
55 | public function getLanguageKey() |
||
75 | |||
76 | /** |
||
77 | * Translation handler. Does the same job as Extbase translation tools, |
||
78 | * expect that if the index to the LLL reference is not found, the index is |
||
79 | * returned (Extbase would have returned an empty string). |
||
80 | * |
||
81 | * @param string $index The index to the LLL reference. |
||
82 | * @param string $extensionKey Key of the extension containing the LLL reference. |
||
83 | * @param array $arguments Arguments passed over to vsprintf. |
||
84 | * @return string The translated string. |
||
85 | */ |
||
86 | public function translate($index, $extensionKey = null, $arguments = null) |
||
97 | |||
98 | /** |
||
99 | * Will check if the TypoScript was actually included, as it contains |
||
100 | * required configuration to make the forms work properly. |
||
101 | * |
||
102 | * @return bool |
||
103 | */ |
||
104 | public function isTypoScriptIncluded() |
||
108 | |||
109 | /** |
||
110 | * @param EnvironmentService $environmentService |
||
111 | */ |
||
112 | public function injectEnvironmentService(EnvironmentService $environmentService) |
||
116 | |||
117 | /** |
||
118 | * @param TypoScriptService $typoScriptService |
||
119 | */ |
||
120 | public function injectTypoScriptService(TypoScriptService $typoScriptService) |
||
124 | } |
||
125 |