@@ -112,58 +112,58 @@ |
||
112 | 112 | $thisSlugId = 't3js-form-field-slug-id' . StringUtility::getUniqueId(); |
113 | 113 | $mainFieldHtml = []; |
114 | 114 | $mainFieldHtml[] = '<div class="formengine-field-item t3js-formengine-field-item">'; |
115 | - $mainFieldHtml[] = $fieldInformationHtml; |
|
116 | - $mainFieldHtml[] = '<div class="form-control-wrap" style="max-width: ' . $width . 'px" id="' . htmlspecialchars($thisSlugId) . '">'; |
|
117 | - $mainFieldHtml[] = '<div class="form-wizards-wrap">'; |
|
118 | - $mainFieldHtml[] = '<div class="form-wizards-element">'; |
|
119 | - $mainFieldHtml[] = '<div class="input-group">'; |
|
120 | - $mainFieldHtml[] = ($baseUrl ? '<span class="input-group-addon">' . htmlspecialchars($baseUrl) . '</span>' : ''); |
|
115 | + $mainFieldHtml[] = $fieldInformationHtml; |
|
116 | + $mainFieldHtml[] = '<div class="form-control-wrap" style="max-width: ' . $width . 'px" id="' . htmlspecialchars($thisSlugId) . '">'; |
|
117 | + $mainFieldHtml[] = '<div class="form-wizards-wrap">'; |
|
118 | + $mainFieldHtml[] = '<div class="form-wizards-element">'; |
|
119 | + $mainFieldHtml[] = '<div class="input-group">'; |
|
120 | + $mainFieldHtml[] = ($baseUrl ? '<span class="input-group-addon">' . htmlspecialchars($baseUrl) . '</span>' : ''); |
|
121 | 121 | // We deal with 3 fields here: a readonly field for current / default values, an input |
122 | 122 | // field to manipulate the value, and the final hidden field used to send the value |
123 | - $mainFieldHtml[] = '<input'; |
|
124 | - $mainFieldHtml[] = ' class="form-control t3js-form-field-slug-readonly"'; |
|
125 | - $mainFieldHtml[] = ' data-toggle="tooltip"'; |
|
126 | - $mainFieldHtml[] = ' data-title="' . htmlspecialchars($itemValue) . '"'; |
|
127 | - $mainFieldHtml[] = ' value="' . htmlspecialchars($itemValue) . '"'; |
|
128 | - $mainFieldHtml[] = ' readonly'; |
|
129 | - $mainFieldHtml[] = ' />'; |
|
130 | - $mainFieldHtml[] = '<input type="text"'; |
|
131 | - $mainFieldHtml[] = ' id="' . htmlspecialchars(StringUtility::getUniqueId('formengine-input-')) . '"'; |
|
132 | - $mainFieldHtml[] = ' class="form-control t3js-form-field-slug-input hidden"'; |
|
133 | - $mainFieldHtml[] = ' placeholder="' . htmlspecialchars($row['slug'] ?? '/') . '"'; |
|
134 | - $mainFieldHtml[] = ' data-formengine-validation-rules="' . htmlspecialchars($this->getValidationDataAsJsonString($config)) . '"'; |
|
135 | - $mainFieldHtml[] = ' data-formengine-input-params="' . htmlspecialchars((string)json_encode(['field' => $parameterArray['itemFormElName'], 'evalList' => implode(',', $evalList)])) . '"'; |
|
136 | - $mainFieldHtml[] = ' data-formengine-input-name="' . htmlspecialchars($parameterArray['itemFormElName']) . '"'; |
|
137 | - $mainFieldHtml[] = ' />'; |
|
138 | - $mainFieldHtml[] = '<span class="input-group-btn">'; |
|
139 | - $mainFieldHtml[] = '<button class="btn btn-default t3js-form-field-slug-toggle" type="button" title="' . htmlspecialchars($toggleButtonTitle) . '">'; |
|
140 | - $mainFieldHtml[] = $this->iconFactory->getIcon('actions-version-workspaces-preview-link', Icon::SIZE_SMALL)->render(); |
|
141 | - $mainFieldHtml[] = '</button>'; |
|
142 | - $mainFieldHtml[] = '<button class="btn btn-default t3js-form-field-slug-recreate" type="button" title="' . htmlspecialchars($recreateButtonTitle) . '">'; |
|
143 | - $mainFieldHtml[] = $this->iconFactory->getIcon('actions-refresh', Icon::SIZE_SMALL)->render(); |
|
144 | - $mainFieldHtml[] = '</button>'; |
|
145 | - $mainFieldHtml[] = '</span>'; |
|
146 | - $mainFieldHtml[] = '<input type="hidden"'; |
|
147 | - $mainFieldHtml[] = ' class="t3js-form-field-slug-hidden"'; |
|
148 | - $mainFieldHtml[] = ' name="' . htmlspecialchars($parameterArray['itemFormElName']) . '"'; |
|
149 | - $mainFieldHtml[] = ' value="' . htmlspecialchars($itemValue) . '"'; |
|
150 | - $mainFieldHtml[] = ' />'; |
|
151 | - $mainFieldHtml[] = '</div>'; |
|
152 | - $mainFieldHtml[] = '</div>'; |
|
123 | + $mainFieldHtml[] = '<input'; |
|
124 | + $mainFieldHtml[] = ' class="form-control t3js-form-field-slug-readonly"'; |
|
125 | + $mainFieldHtml[] = ' data-toggle="tooltip"'; |
|
126 | + $mainFieldHtml[] = ' data-title="' . htmlspecialchars($itemValue) . '"'; |
|
127 | + $mainFieldHtml[] = ' value="' . htmlspecialchars($itemValue) . '"'; |
|
128 | + $mainFieldHtml[] = ' readonly'; |
|
129 | + $mainFieldHtml[] = ' />'; |
|
130 | + $mainFieldHtml[] = '<input type="text"'; |
|
131 | + $mainFieldHtml[] = ' id="' . htmlspecialchars(StringUtility::getUniqueId('formengine-input-')) . '"'; |
|
132 | + $mainFieldHtml[] = ' class="form-control t3js-form-field-slug-input hidden"'; |
|
133 | + $mainFieldHtml[] = ' placeholder="' . htmlspecialchars($row['slug'] ?? '/') . '"'; |
|
134 | + $mainFieldHtml[] = ' data-formengine-validation-rules="' . htmlspecialchars($this->getValidationDataAsJsonString($config)) . '"'; |
|
135 | + $mainFieldHtml[] = ' data-formengine-input-params="' . htmlspecialchars((string)json_encode(['field' => $parameterArray['itemFormElName'], 'evalList' => implode(',', $evalList)])) . '"'; |
|
136 | + $mainFieldHtml[] = ' data-formengine-input-name="' . htmlspecialchars($parameterArray['itemFormElName']) . '"'; |
|
137 | + $mainFieldHtml[] = ' />'; |
|
138 | + $mainFieldHtml[] = '<span class="input-group-btn">'; |
|
139 | + $mainFieldHtml[] = '<button class="btn btn-default t3js-form-field-slug-toggle" type="button" title="' . htmlspecialchars($toggleButtonTitle) . '">'; |
|
140 | + $mainFieldHtml[] = $this->iconFactory->getIcon('actions-version-workspaces-preview-link', Icon::SIZE_SMALL)->render(); |
|
141 | + $mainFieldHtml[] = '</button>'; |
|
142 | + $mainFieldHtml[] = '<button class="btn btn-default t3js-form-field-slug-recreate" type="button" title="' . htmlspecialchars($recreateButtonTitle) . '">'; |
|
143 | + $mainFieldHtml[] = $this->iconFactory->getIcon('actions-refresh', Icon::SIZE_SMALL)->render(); |
|
144 | + $mainFieldHtml[] = '</button>'; |
|
145 | + $mainFieldHtml[] = '</span>'; |
|
146 | + $mainFieldHtml[] = '<input type="hidden"'; |
|
147 | + $mainFieldHtml[] = ' class="t3js-form-field-slug-hidden"'; |
|
148 | + $mainFieldHtml[] = ' name="' . htmlspecialchars($parameterArray['itemFormElName']) . '"'; |
|
149 | + $mainFieldHtml[] = ' value="' . htmlspecialchars($itemValue) . '"'; |
|
150 | + $mainFieldHtml[] = ' />'; |
|
151 | + $mainFieldHtml[] = '</div>'; |
|
152 | + $mainFieldHtml[] = '</div>'; |
|
153 | 153 | if (!empty($fieldControlHtml)) { |
154 | - $mainFieldHtml[] = '<div class="form-wizards-items-aside">'; |
|
155 | - $mainFieldHtml[] = '<div class="btn-group">'; |
|
156 | - $mainFieldHtml[] = $fieldControlHtml; |
|
157 | - $mainFieldHtml[] = '</div>'; |
|
158 | - $mainFieldHtml[] = '</div>'; |
|
154 | + $mainFieldHtml[] = '<div class="form-wizards-items-aside">'; |
|
155 | + $mainFieldHtml[] = '<div class="btn-group">'; |
|
156 | + $mainFieldHtml[] = $fieldControlHtml; |
|
157 | + $mainFieldHtml[] = '</div>'; |
|
158 | + $mainFieldHtml[] = '</div>'; |
|
159 | 159 | } |
160 | - $mainFieldHtml[] = '<div class="form-wizards-items-bottom">'; |
|
161 | - $mainFieldHtml[] = '<span class="t3js-form-proposal-accepted hidden label label-success">' . htmlspecialchars($successMessage) . '<span>/abc/</span></span>'; |
|
162 | - $mainFieldHtml[] = '<span class="t3js-form-proposal-different hidden label label-warning">' . htmlspecialchars($errorMessage) . '<span>/abc/</span></span>'; |
|
163 | - $mainFieldHtml[] = $fieldWizardHtml; |
|
164 | - $mainFieldHtml[] = '</div>'; |
|
165 | - $mainFieldHtml[] = '</div>'; |
|
166 | - $mainFieldHtml[] = '</div>'; |
|
160 | + $mainFieldHtml[] = '<div class="form-wizards-items-bottom">'; |
|
161 | + $mainFieldHtml[] = '<span class="t3js-form-proposal-accepted hidden label label-success">' . htmlspecialchars($successMessage) . '<span>/abc/</span></span>'; |
|
162 | + $mainFieldHtml[] = '<span class="t3js-form-proposal-different hidden label label-warning">' . htmlspecialchars($errorMessage) . '<span>/abc/</span></span>'; |
|
163 | + $mainFieldHtml[] = $fieldWizardHtml; |
|
164 | + $mainFieldHtml[] = '</div>'; |
|
165 | + $mainFieldHtml[] = '</div>'; |
|
166 | + $mainFieldHtml[] = '</div>'; |
|
167 | 167 | $mainFieldHtml[] = '</div>'; |
168 | 168 | |
169 | 169 | $resultArray['html'] = implode(LF, $mainFieldHtml); |
@@ -72,8 +72,8 @@ discard block |
||
72 | 72 | if ($defaultLanguageValue !== '') { |
73 | 73 | $iconIdentifier = $this->data['systemLanguageRows'][0]['flagIconIdentifier'] ?: 'flags-multiple'; |
74 | 74 | $html[] = '<div class="t3-form-original-language">'; |
75 | - $html[] = $iconFactory->getIcon($iconIdentifier, Icon::SIZE_SMALL)->render(); |
|
76 | - $html[] = $this->previewFieldValue($defaultLanguageValue); |
|
75 | + $html[] = $iconFactory->getIcon($iconIdentifier, Icon::SIZE_SMALL)->render(); |
|
76 | + $html[] = $this->previewFieldValue($defaultLanguageValue); |
|
77 | 77 | $html[] = '</div>'; |
78 | 78 | } |
79 | 79 | $additionalPreviewLanguages = $this->data['additionalLanguageRows']; |
@@ -87,8 +87,8 @@ discard block |
||
87 | 87 | ) ?? ''; |
88 | 88 | if ($defaultLanguageValue !== '') { |
89 | 89 | $html[] = '<div class="t3-form-original-language">'; |
90 | - $html[] = $iconFactory->getIcon($this->data['systemLanguageRows'][$previewLanguage['sys_language_uid']]['flagIconIdentifier'], Icon::SIZE_SMALL)->render(); |
|
91 | - $html[] = $this->previewFieldValue($defaultLanguageValue); |
|
90 | + $html[] = $iconFactory->getIcon($this->data['systemLanguageRows'][$previewLanguage['sys_language_uid']]['flagIconIdentifier'], Icon::SIZE_SMALL)->render(); |
|
91 | + $html[] = $this->previewFieldValue($defaultLanguageValue); |
|
92 | 92 | $html[] = '</div>'; |
93 | 93 | } |
94 | 94 | } |
@@ -70,17 +70,17 @@ |
||
70 | 70 | BackendUtility::getProcessedValue($table, $fieldName, $defaultLanguageRow[$fieldName], 0, true) |
71 | 71 | ); |
72 | 72 | $html[] = '<div class="t3-form-original-language-diff">'; |
73 | - $html[] = '<div class="t3-form-original-language-diffheader">'; |
|
74 | - $html[] = htmlspecialchars($languageService->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.changeInOrig')); |
|
75 | - $html[] = '</div>'; |
|
76 | - $html[] = '<div class="t3-form-original-language-diffcontent">'; |
|
77 | - $html[] = '<div class="diff">'; |
|
78 | - $html[] = '<div class="diff-item">'; |
|
79 | - $html[] = '<div class="diff-item-result diff-item-result-inline">' . $diffResult . '</div>'; |
|
80 | - $html[] = '</div>'; |
|
81 | - $html[] = '</div>'; |
|
82 | - $html[] = '</div>'; |
|
83 | - $html[] = '</div>'; |
|
73 | + $html[] = '<div class="t3-form-original-language-diffheader">'; |
|
74 | + $html[] = htmlspecialchars($languageService->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.changeInOrig')); |
|
75 | + $html[] = '</div>'; |
|
76 | + $html[] = '<div class="t3-form-original-language-diffcontent">'; |
|
77 | + $html[] = '<div class="diff">'; |
|
78 | + $html[] = '<div class="diff-item">'; |
|
79 | + $html[] = '<div class="diff-item-result diff-item-result-inline">' . $diffResult . '</div>'; |
|
80 | + $html[] = '</div>'; |
|
81 | + $html[] = '</div>'; |
|
82 | + $html[] = '</div>'; |
|
83 | + $html[] = '</div>'; |
|
84 | 84 | } |
85 | 85 | $result['html'] = implode(LF, $html); |
86 | 86 | return $result; |
@@ -128,9 +128,9 @@ |
||
128 | 128 | |
129 | 129 | $html = []; |
130 | 130 | $html[] = '<a ' . GeneralUtility::implodeAttributes($linkAttributes, true) . '>'; |
131 | - $html[] = '<span title="' . htmlspecialchars($title) . '">'; |
|
132 | - $html[] = $iconFactory->getIcon($icon, Icon::SIZE_SMALL)->render(); |
|
133 | - $html[] = '</span>'; |
|
131 | + $html[] = '<span title="' . htmlspecialchars($title) . '">'; |
|
132 | + $html[] = $iconFactory->getIcon($icon, Icon::SIZE_SMALL)->render(); |
|
133 | + $html[] = '</span>'; |
|
134 | 134 | $html[] = '</a>'; |
135 | 135 | |
136 | 136 | $finalControlResult = $this->initializeResultArray(); |
@@ -488,7 +488,7 @@ discard block |
||
488 | 488 | if ($sortby === 'uid') { |
489 | 489 | usort( |
490 | 490 | $this->itemArray, |
491 | - function ($a, $b) { |
|
491 | + function($a, $b) { |
|
492 | 492 | return $a['id'] < $b['id'] ? -1 : 1; |
493 | 493 | } |
494 | 494 | ); |
@@ -1439,7 +1439,7 @@ discard block |
||
1439 | 1439 | } |
1440 | 1440 | |
1441 | 1441 | $purgedItemIds = []; |
1442 | - $callable =[$this, $purgeCallback]; |
|
1442 | + $callable = [$this, $purgeCallback]; |
|
1443 | 1443 | if (is_callable($callable)) { |
1444 | 1444 | $purgedItemIds = call_user_func($callable, $itemTableName, $itemIds); |
1445 | 1445 | } |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | // Ignore new indexes that work on columns that need changes |
163 | 163 | foreach ($changedTable->addedIndexes as $indexName => $addedIndex) { |
164 | 164 | $indexColumns = array_map( |
165 | - function ($columnName) { |
|
165 | + function($columnName) { |
|
166 | 166 | // Strip MySQL prefix length information to get real column names |
167 | 167 | $columnName = preg_replace('/\(\d+\)$/', '', $columnName) ?? ''; |
168 | 168 | // Strip mssql '[' and ']' from column names |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | $tablesForConnection = array_keys( |
257 | 257 | array_filter( |
258 | 258 | $GLOBALS['TYPO3_CONF_VARS']['DB']['TableMapping'], |
259 | - function ($tableConnectionName) use ($connectionName) { |
|
259 | + function($tableConnectionName) use ($connectionName) { |
|
260 | 260 | return $tableConnectionName === $connectionName; |
261 | 261 | } |
262 | 262 | ) |
@@ -1096,7 +1096,7 @@ discard block |
||
1096 | 1096 | { |
1097 | 1097 | return array_filter( |
1098 | 1098 | $tableDiffs, |
1099 | - function ($table) use ($validTableNames) { |
|
1099 | + function($table) use ($validTableNames) { |
|
1100 | 1100 | if ($table instanceof Table) { |
1101 | 1101 | $tableName = $table->getName(); |
1102 | 1102 | } else { |
@@ -1141,7 +1141,7 @@ discard block |
||
1141 | 1141 | |
1142 | 1142 | // Remove the length information from column names for indexes if required. |
1143 | 1143 | $cleanedColumnNames = array_map( |
1144 | - function (string $columnName) use ($connection) { |
|
1144 | + function(string $columnName) use ($connection) { |
|
1145 | 1145 | if ($connection->getDatabasePlatform() instanceof MySqlPlatform) { |
1146 | 1146 | // Returning the unquoted, unmodified version of the column name since |
1147 | 1147 | // it can include the length information for BLOB/TEXT columns which |
@@ -119,7 +119,7 @@ |
||
119 | 119 | $values = explode($quoteChar . ',' . $quoteChar, substr($valuesDefinition, 1, -1)) ?: []; |
120 | 120 | |
121 | 121 | return array_map( |
122 | - function (string $value) use ($quoteChar) { |
|
122 | + function(string $value) use ($quoteChar) { |
|
123 | 123 | return str_replace($quoteChar . $quoteChar, $quoteChar, $value); |
124 | 124 | }, |
125 | 125 | $values |
@@ -177,7 +177,7 @@ |
||
177 | 177 | ); |
178 | 178 | foreach ($context->getLanguagesToShow() as $siteLanguage) { |
179 | 179 | $localizedLanguageId = $siteLanguage->getLanguageId(); |
180 | - if ($localizedLanguageId <= 0) { |
|
180 | + if ($localizedLanguageId <= 0) { |
|
181 | 181 | continue; |
182 | 182 | } |
183 | 183 |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | // Map array to correct keys |
42 | 42 | $allSessions = array_map( |
43 | - function ($session) { |
|
43 | + function($session) { |
|
44 | 44 | return [ |
45 | 45 | 'id' => $session['ses_id'], // this is the hashed sessionId |
46 | 46 | 'ip' => $session['ses_iplock'], |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | ); |
53 | 53 | |
54 | 54 | // Sort by timestamp |
55 | - usort($allSessions, function ($session1, $session2) { |
|
55 | + usort($allSessions, function($session1, $session2) { |
|
56 | 56 | return $session1['timestamp'] <=> $session2['timestamp']; |
57 | 57 | }); |
58 | 58 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | return array_filter( |
73 | 73 | $allActive, |
74 | - function ($session) use ($backendUser) { |
|
74 | + function($session) use ($backendUser) { |
|
75 | 75 | return (int)$session['ses_userid'] === $backendUser->getUid(); |
76 | 76 | } |
77 | 77 | ); |