@@ -139,43 +139,43 @@ |
||
139 | 139 | $html = []; |
140 | 140 | $html[] = '<div class="formengine-field-item t3js-formengine-field-item">'; |
141 | 141 | $html[] = $fieldInformationHtml; |
142 | - $html[] = '<div class="form-control-wrap">'; |
|
143 | - $html[] = '<div class="form-wizards-wrap">'; |
|
144 | - $html[] = '<div class="form-wizards-element">'; |
|
145 | - $html[] = '<div class="typo3-tceforms-tree">'; |
|
146 | - $html[] = '<input class="treeRecord" type="hidden" id="' . htmlspecialchars($fieldId) . '"'; |
|
147 | - $html[] = ' data-formengine-validation-rules="' . htmlspecialchars($this->getValidationDataAsJsonString($config)) . '"'; |
|
148 | - $html[] = ' data-relatedfieldname="' . htmlspecialchars($parameterArray['itemFormElName']) . '"'; |
|
149 | - $html[] = ' data-tablename="' . htmlspecialchars($this->data['tableName']) . '"'; |
|
150 | - $html[] = ' data-fieldname="' . htmlspecialchars($this->data['fieldName']) . '"'; |
|
151 | - $html[] = ' data-uid="' . (int)$this->data['vanillaUid'] . '"'; |
|
152 | - $html[] = ' data-recordtypevalue="' . htmlspecialchars($this->data['recordTypeValue']) . '"'; |
|
153 | - $html[] = ' data-datastructureidentifier="' . htmlspecialchars($dataStructureIdentifier) . '"'; |
|
154 | - $html[] = ' data-flexformsheetname="' . htmlspecialchars($flexFormSheetName) . '"'; |
|
155 | - $html[] = ' data-flexformfieldname="' . htmlspecialchars($flexFormFieldName) . '"'; |
|
156 | - $html[] = ' data-flexformcontainername="' . htmlspecialchars($flexFormContainerName) . '"'; |
|
157 | - $html[] = ' data-flexformcontaineridentifier="' . htmlspecialchars($flexFormContainerIdentifier) . '"'; |
|
158 | - $html[] = ' data-flexformcontainerfieldname="' . htmlspecialchars($flexFormContainerFieldName) . '"'; |
|
159 | - $html[] = ' data-flexformsectioncontainerisnew="' . htmlspecialchars($flexFormSectionContainerIsNew) . '"'; |
|
160 | - $html[] = ' data-command="' . htmlspecialchars($this->data['command']) . '"'; |
|
161 | - $html[] = ' data-read-only="' . $readOnly . '"'; |
|
162 | - $html[] = ' data-tree-exclusive-keys="' . htmlspecialchars($exclusiveKeys) . '"'; |
|
163 | - $html[] = ' data-tree-expand-up-to-level="' . ($expanded ? '999' : '1') . '"'; |
|
164 | - $html[] = ' data-tree-show-toolbar="' . $showHeader . '"'; |
|
165 | - $html[] = ' name="' . htmlspecialchars($parameterArray['itemFormElName']) . '"'; |
|
166 | - $html[] = ' id="treeinput' . $formElementId . '"'; |
|
167 | - $html[] = ' value="' . htmlspecialchars(implode(',', $parameterArray['itemFormElValue'])) . '"'; |
|
168 | - $html[] = '/>'; |
|
169 | - $html[] = '</div>'; |
|
170 | - $html[] = '<div id="' . $treeWrapperId . '" class="svg-tree-wrapper" style="height: ' . $heightInPx . 'px;"></div>'; |
|
171 | - $html[] = '</div>'; |
|
142 | + $html[] = '<div class="form-control-wrap">'; |
|
143 | + $html[] = '<div class="form-wizards-wrap">'; |
|
144 | + $html[] = '<div class="form-wizards-element">'; |
|
145 | + $html[] = '<div class="typo3-tceforms-tree">'; |
|
146 | + $html[] = '<input class="treeRecord" type="hidden" id="' . htmlspecialchars($fieldId) . '"'; |
|
147 | + $html[] = ' data-formengine-validation-rules="' . htmlspecialchars($this->getValidationDataAsJsonString($config)) . '"'; |
|
148 | + $html[] = ' data-relatedfieldname="' . htmlspecialchars($parameterArray['itemFormElName']) . '"'; |
|
149 | + $html[] = ' data-tablename="' . htmlspecialchars($this->data['tableName']) . '"'; |
|
150 | + $html[] = ' data-fieldname="' . htmlspecialchars($this->data['fieldName']) . '"'; |
|
151 | + $html[] = ' data-uid="' . (int)$this->data['vanillaUid'] . '"'; |
|
152 | + $html[] = ' data-recordtypevalue="' . htmlspecialchars($this->data['recordTypeValue']) . '"'; |
|
153 | + $html[] = ' data-datastructureidentifier="' . htmlspecialchars($dataStructureIdentifier) . '"'; |
|
154 | + $html[] = ' data-flexformsheetname="' . htmlspecialchars($flexFormSheetName) . '"'; |
|
155 | + $html[] = ' data-flexformfieldname="' . htmlspecialchars($flexFormFieldName) . '"'; |
|
156 | + $html[] = ' data-flexformcontainername="' . htmlspecialchars($flexFormContainerName) . '"'; |
|
157 | + $html[] = ' data-flexformcontaineridentifier="' . htmlspecialchars($flexFormContainerIdentifier) . '"'; |
|
158 | + $html[] = ' data-flexformcontainerfieldname="' . htmlspecialchars($flexFormContainerFieldName) . '"'; |
|
159 | + $html[] = ' data-flexformsectioncontainerisnew="' . htmlspecialchars($flexFormSectionContainerIsNew) . '"'; |
|
160 | + $html[] = ' data-command="' . htmlspecialchars($this->data['command']) . '"'; |
|
161 | + $html[] = ' data-read-only="' . $readOnly . '"'; |
|
162 | + $html[] = ' data-tree-exclusive-keys="' . htmlspecialchars($exclusiveKeys) . '"'; |
|
163 | + $html[] = ' data-tree-expand-up-to-level="' . ($expanded ? '999' : '1') . '"'; |
|
164 | + $html[] = ' data-tree-show-toolbar="' . $showHeader . '"'; |
|
165 | + $html[] = ' name="' . htmlspecialchars($parameterArray['itemFormElName']) . '"'; |
|
166 | + $html[] = ' id="treeinput' . $formElementId . '"'; |
|
167 | + $html[] = ' value="' . htmlspecialchars(implode(',', $parameterArray['itemFormElValue'])) . '"'; |
|
168 | + $html[] = '/>'; |
|
169 | + $html[] = '</div>'; |
|
170 | + $html[] = '<div id="' . $treeWrapperId . '" class="svg-tree-wrapper" style="height: ' . $heightInPx . 'px;"></div>'; |
|
171 | + $html[] = '</div>'; |
|
172 | 172 | if ($readOnly === 'false' && !empty($fieldWizardHtml)) { |
173 | - $html[] = '<div class="form-wizards-items-bottom">'; |
|
174 | - $html[] = $fieldWizardHtml; |
|
175 | - $html[] = '</div>'; |
|
173 | + $html[] = '<div class="form-wizards-items-bottom">'; |
|
174 | + $html[] = $fieldWizardHtml; |
|
175 | + $html[] = '</div>'; |
|
176 | 176 | } |
177 | - $html[] = '</div>'; |
|
178 | - $html[] = '</div>'; |
|
177 | + $html[] = '</div>'; |
|
178 | + $html[] = '</div>'; |
|
179 | 179 | $html[] = '</div>'; |
180 | 180 | |
181 | 181 | $resultArray['html'] = implode(LF, $html); |
@@ -1370,7 +1370,7 @@ discard block |
||
1370 | 1370 | // sanitize module names in internal 'paths' |
1371 | 1371 | $internalPathModuleNames = array_keys($requireJsConfig['internal']['paths'] ?? []); |
1372 | 1372 | $sanitizedInternalPathModuleNames = array_map( |
1373 | - function ($moduleName) { |
|
1373 | + function($moduleName) { |
|
1374 | 1374 | // trim spaces and slashes & add ending slash |
1375 | 1375 | return trim($moduleName, ' /') . '/'; |
1376 | 1376 | }, |
@@ -1470,7 +1470,7 @@ discard block |
||
1470 | 1470 | { |
1471 | 1471 | return array_filter( |
1472 | 1472 | $array, |
1473 | - function (string $key) use ($keys, $keep) { |
|
1473 | + function(string $key) use ($keys, $keep) { |
|
1474 | 1474 | return in_array($key, $keys, true) === $keep; |
1475 | 1475 | }, |
1476 | 1476 | ARRAY_FILTER_USE_KEY |
@@ -361,14 +361,14 @@ discard block |
||
361 | 361 | { |
362 | 362 | foreach ($newState as $var => $value) { |
363 | 363 | switch ($var) { |
364 | - case 'locales': |
|
365 | - break; |
|
366 | - case 'metaTagRegistry': |
|
367 | - $this->metaTagRegistry->updateState($value); |
|
368 | - break; |
|
369 | - default: |
|
370 | - $this->{$var} = $value; |
|
371 | - break; |
|
364 | + case 'locales': |
|
365 | + break; |
|
366 | + case 'metaTagRegistry': |
|
367 | + $this->metaTagRegistry->updateState($value); |
|
368 | + break; |
|
369 | + default: |
|
370 | + $this->{$var} = $value; |
|
371 | + break; |
|
372 | 372 | } |
373 | 373 | } |
374 | 374 | } |
@@ -382,14 +382,14 @@ discard block |
||
382 | 382 | $state = []; |
383 | 383 | foreach (get_object_vars($this) as $var => $value) { |
384 | 384 | switch ($var) { |
385 | - case 'locales': |
|
386 | - break; |
|
387 | - case 'metaTagRegistry': |
|
388 | - $state[$var] = $this->metaTagRegistry->getState(); |
|
389 | - break; |
|
390 | - default: |
|
391 | - $state[$var] = $value; |
|
392 | - break; |
|
385 | + case 'locales': |
|
386 | + break; |
|
387 | + case 'metaTagRegistry': |
|
388 | + $state[$var] = $this->metaTagRegistry->getState(); |
|
389 | + break; |
|
390 | + default: |
|
391 | + $state[$var] = $value; |
|
392 | + break; |
|
393 | 393 | } |
394 | 394 | } |
395 | 395 | return $state; |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | if (!empty($GLOBALS['TBE_STYLES']['stylesheets']['admPanel'])) { |
82 | 82 | $stylesheet = GeneralUtility::locationHeaderUrl($GLOBALS['TBE_STYLES']['stylesheets']['admPanel']); |
83 | 83 | $result = '<link rel="stylesheet" type="text/css" href="' . |
84 | - htmlspecialchars($stylesheet, ENT_QUOTES | ENT_HTML5) . '" />'; |
|
84 | + htmlspecialchars($stylesheet, ENT_QUOTES | ENT_HTML5) . '" />'; |
|
85 | 85 | } |
86 | 86 | return $result; |
87 | 87 | } |
@@ -95,11 +95,11 @@ discard block |
||
95 | 95 | protected static function getCssTag(string $cssFileLocation): string |
96 | 96 | { |
97 | 97 | $css = '<link type="text/css" rel="stylesheet" href="' . |
98 | - htmlspecialchars( |
|
99 | - PathUtility::getAbsoluteWebPath(GeneralUtility::getFileAbsFileName($cssFileLocation)), |
|
100 | - ENT_QUOTES | ENT_HTML5 |
|
101 | - ) . |
|
102 | - '" media="all" />'; |
|
98 | + htmlspecialchars( |
|
99 | + PathUtility::getAbsoluteWebPath(GeneralUtility::getFileAbsFileName($cssFileLocation)), |
|
100 | + ENT_QUOTES | ENT_HTML5 |
|
101 | + ) . |
|
102 | + '" media="all" />'; |
|
103 | 103 | return $css; |
104 | 104 | } |
105 | 105 | |
@@ -112,11 +112,11 @@ discard block |
||
112 | 112 | protected static function getJsTag(string $jsFileLocation): string |
113 | 113 | { |
114 | 114 | $js = '<script src="' . |
115 | - htmlspecialchars( |
|
116 | - PathUtility::getAbsoluteWebPath(GeneralUtility::getFileAbsFileName($jsFileLocation)), |
|
117 | - ENT_QUOTES | ENT_HTML5 |
|
118 | - ) . |
|
119 | - '"></script>'; |
|
115 | + htmlspecialchars( |
|
116 | + PathUtility::getAbsoluteWebPath(GeneralUtility::getFileAbsFileName($jsFileLocation)), |
|
117 | + ENT_QUOTES | ENT_HTML5 |
|
118 | + ) . |
|
119 | + '"></script>'; |
|
120 | 120 | return $js; |
121 | 121 | } |
122 | 122 |
@@ -470,7 +470,7 @@ |
||
470 | 470 | protected function getLanguageFallbackChain(?LanguageAspect $languageAspect): array |
471 | 471 | { |
472 | 472 | $languageAspect = $languageAspect ?? $this->context->getAspect('language'); |
473 | - return array_filter($languageAspect->getFallbackChain(), function ($item) { |
|
473 | + return array_filter($languageAspect->getFallbackChain(), function($item) { |
|
474 | 474 | return MathUtility::canBeInterpretedAsInteger($item); |
475 | 475 | }); |
476 | 476 | } |
@@ -78,16 +78,16 @@ discard block |
||
78 | 78 | { |
79 | 79 | switch ($name) { |
80 | 80 | // Ensure the default aspects are available, this is mostly necessary for tests to not set up everything |
81 | - case 'date': |
|
82 | - case 'visibility': |
|
83 | - case 'backend.user': |
|
84 | - case 'frontend.user': |
|
85 | - case 'workspace': |
|
86 | - case 'language': |
|
87 | - case 'typoscript': |
|
88 | - return true; |
|
89 | - default: |
|
90 | - return isset($this->aspects[$name]); |
|
81 | + case 'date': |
|
82 | + case 'visibility': |
|
83 | + case 'backend.user': |
|
84 | + case 'frontend.user': |
|
85 | + case 'workspace': |
|
86 | + case 'language': |
|
87 | + case 'typoscript': |
|
88 | + return true; |
|
89 | + default: |
|
90 | + return isset($this->aspects[$name]); |
|
91 | 91 | } |
92 | 92 | } |
93 | 93 | |
@@ -103,29 +103,29 @@ discard block |
||
103 | 103 | if (!isset($this->aspects[$name])) { |
104 | 104 | // Ensure the default aspects are available, this is mostly necessary for tests to not set up everything |
105 | 105 | switch ($name) { |
106 | - case 'date': |
|
107 | - $this->setAspect('date', new DateTimeAspect(new \DateTimeImmutable('@' . $GLOBALS['EXEC_TIME']))); |
|
108 | - break; |
|
109 | - case 'visibility': |
|
110 | - $this->setAspect('visibility', new VisibilityAspect()); |
|
111 | - break; |
|
112 | - case 'backend.user': |
|
113 | - $this->setAspect('backend.user', new UserAspect()); |
|
114 | - break; |
|
115 | - case 'frontend.user': |
|
116 | - $this->setAspect('frontend.user', new UserAspect()); |
|
117 | - break; |
|
118 | - case 'workspace': |
|
119 | - $this->setAspect('workspace', new WorkspaceAspect()); |
|
120 | - break; |
|
121 | - case 'language': |
|
122 | - $this->setAspect('language', new LanguageAspect()); |
|
123 | - break; |
|
124 | - case 'typoscript': |
|
125 | - $this->setAspect('typoscript', new TypoScriptAspect()); |
|
126 | - break; |
|
127 | - default: |
|
128 | - throw new AspectNotFoundException('No aspect named "' . $name . '" found.', 1527777641); |
|
106 | + case 'date': |
|
107 | + $this->setAspect('date', new DateTimeAspect(new \DateTimeImmutable('@' . $GLOBALS['EXEC_TIME']))); |
|
108 | + break; |
|
109 | + case 'visibility': |
|
110 | + $this->setAspect('visibility', new VisibilityAspect()); |
|
111 | + break; |
|
112 | + case 'backend.user': |
|
113 | + $this->setAspect('backend.user', new UserAspect()); |
|
114 | + break; |
|
115 | + case 'frontend.user': |
|
116 | + $this->setAspect('frontend.user', new UserAspect()); |
|
117 | + break; |
|
118 | + case 'workspace': |
|
119 | + $this->setAspect('workspace', new WorkspaceAspect()); |
|
120 | + break; |
|
121 | + case 'language': |
|
122 | + $this->setAspect('language', new LanguageAspect()); |
|
123 | + break; |
|
124 | + case 'typoscript': |
|
125 | + $this->setAspect('typoscript', new TypoScriptAspect()); |
|
126 | + break; |
|
127 | + default: |
|
128 | + throw new AspectNotFoundException('No aspect named "' . $name . '" found.', 1527777641); |
|
129 | 129 | } |
130 | 130 | } |
131 | 131 | return $this->aspects[$name]; |
@@ -259,7 +259,7 @@ |
||
259 | 259 | $editableComments[$const]['subcat_name'] = $catSplit[1]; |
260 | 260 | $orderIdentifier = isset($catSplit[2]) ? trim($catSplit[2]) : $counter; |
261 | 261 | $editableComments[$const]['subcat'] = $this->subCategories[$catSplit[1]][1] |
262 | - . '/' . $catSplit[1] . '/' . $orderIdentifier . 'z'; |
|
262 | + . '/' . $catSplit[1] . '/' . $orderIdentifier . 'z'; |
|
263 | 263 | } elseif (isset($catSplit[2])) { |
264 | 264 | $editableComments[$const]['subcat'] = 'x/' . trim($catSplit[2]) . 'z'; |
265 | 265 | } else { |
@@ -76,7 +76,7 @@ |
||
76 | 76 | // Sort configurations of each subcategory |
77 | 77 | foreach ($hierarchicConfiguration as &$catConfigurationArray) { |
78 | 78 | foreach ($catConfigurationArray as &$subcatConfigurationArray) { |
79 | - uasort($subcatConfigurationArray, function ($a, $b) { |
|
79 | + uasort($subcatConfigurationArray, function($a, $b) { |
|
80 | 80 | return strnatcmp($a['subcat'], $b['subcat']); |
81 | 81 | }); |
82 | 82 | } |
@@ -334,7 +334,7 @@ |
||
334 | 334 | } |
335 | 335 | } |
336 | 336 | } |
337 | - usort($historyDataForRecord, static function (array $a, array $b): int { |
|
337 | + usort($historyDataForRecord, static function(array $a, array $b): int { |
|
338 | 338 | if ($a['tstamp'] < $b['tstamp']) { |
339 | 339 | return 1; |
340 | 340 | } |
@@ -165,7 +165,7 @@ |
||
165 | 165 | { |
166 | 166 | uasort( |
167 | 167 | $itemList, |
168 | - function (FileReference $a, FileReference $b) { |
|
168 | + function(FileReference $a, FileReference $b) { |
|
169 | 169 | $sortA = (int)$a->getReferenceProperty('sorting_foreign'); |
170 | 170 | $sortB = (int)$b->getReferenceProperty('sorting_foreign'); |
171 | 171 |
@@ -181,7 +181,7 @@ |
||
181 | 181 | protected function resetConstraintsOnMemoryExhaustionError() |
182 | 182 | { |
183 | 183 | $reservedMemory = new \SplFixedArray(187500); // 3M |
184 | - register_shutdown_function(function () use (&$reservedMemory) { |
|
184 | + register_shutdown_function(function() use (&$reservedMemory) { |
|
185 | 185 | $reservedMemory = null; // free the reserved memory |
186 | 186 | $error = error_get_last(); |
187 | 187 | if (strpos($error['message'], 'Allowed memory size of') !== false) { |