‪TYPO3CMS  ‪main
FormFilesAjaxController.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
20 use Psr\Http\Message\ResponseFactoryInterface;
21 use Psr\Http\Message\ResponseInterface;
22 use Psr\Http\Message\ServerRequestInterface;
23 use Psr\Http\Message\StreamFactoryInterface;
33 use TYPO3\CMS\Core\Page\JavaScriptItems;
38 
42 #[AsController]
44 {
45  private const ‪FILE_REFERENCE_TABLE = 'sys_file_reference';
46 
47  public function ‪__construct(
48  private readonly ResponseFactoryInterface $responseFactory,
49  private readonly StreamFactoryInterface $streamFactory,
50  private readonly ‪FormDataCompiler $formDataCompiler,
51  ) {}
52 
56  public function ‪createAction(ServerRequestInterface $request): ResponseInterface
57  {
58  $arguments = $request->getParsedBody()['ajax'];
59  $parentConfig = $this->‪extractSignedParentConfigFromRequest((string)($arguments['context'] ?? ''));
60 
61  $domObjectId = (string)($arguments[0] ?? '');
62  $inlineFirstPid = $this->‪getInlineFirstPidFromDomObjectId($domObjectId);
63  if (!‪MathUtility::canBeInterpretedAsInteger($inlineFirstPid) && !str_starts_with((string)$inlineFirstPid, 'NEW')) {
64  throw new \RuntimeException(
65  'inlineFirstPid should either be an integer or a "NEW..." string',
66  1664440476
67  );
68  }
69  $fileId = null;
70  if (isset($arguments[1]) && ‪MathUtility::canBeInterpretedAsInteger($arguments[1])) {
71  $fileId = (int)$arguments[1];
72  }
73 
74  $inlineStackProcessor = GeneralUtility::makeInstance(InlineStackProcessor::class);
75  $inlineStackProcessor->initializeByParsingDomObjectIdString($domObjectId);
76  $inlineStackProcessor->setAjaxConfiguration($parentConfig);
77  $inlineTopMostParent = $inlineStackProcessor->getStructureLevel(0);
78 
79  $parent = $inlineStackProcessor->getStructureLevel(-1);
80  $fileReference = $inlineStackProcessor->getUnstableStructure();
81 
82  if (isset($fileReference['uid']) && ‪MathUtility::canBeInterpretedAsInteger($fileReference['uid'])) {
83  // If uid comes in, it is the id of the record neighbor record "create after"
84  $fileReferenceVanillaUid = -1 * abs((int)$fileReference['uid']);
85  } else {
86  // Else inline first Pid is the storage pid of new inline records
87  $fileReferenceVanillaUid = $inlineFirstPid;
88  }
89 
90  $formDataCompilerInput = [
91  'request' => $request,
92  'command' => 'new',
93  'tableName' => ‪self::FILE_REFERENCE_TABLE,
94  'vanillaUid' => $fileReferenceVanillaUid,
95  'isInlineChild' => true,
96  'inlineStructure' => $inlineStackProcessor->getStructure(),
97  'inlineFirstPid' => $inlineFirstPid,
98  'inlineParentUid' => $parent['uid'],
99  'inlineParentTableName' => $parent['table'],
100  'inlineParentFieldName' => $parent['field'],
101  'inlineParentConfig' => $parentConfig,
102  'inlineTopMostParentUid' => $inlineTopMostParent['uid'],
103  'inlineTopMostParentTableName' => $inlineTopMostParent['table'],
104  'inlineTopMostParentFieldName' => $inlineTopMostParent['field'],
105  ];
106  if ($fileId) {
107  $formDataCompilerInput['inlineChildChildUid'] = $fileId;
108  }
109 
110  $fileReferenceData = $this->formDataCompiler->compile($formDataCompilerInput, GeneralUtility::makeInstance(TcaDatabaseRecord::class));
111 
112  $fileReferenceData['inlineParentUid'] = $parent['uid'];
113  $fileReferenceData['renderType'] = ‪FileReferenceContainer::NODE_TYPE_IDENTIFIER;
114 
115  return $this->‪jsonResponse(
117  [
118  'data' => '',
119  'stylesheetFiles' => [],
120  'scriptItems' => GeneralUtility::makeInstance(JavaScriptItems::class),
121  'compilerInput' => [
122  'uid' => $fileReferenceData['databaseRow']['uid'],
123  'childChildUid' => $fileId,
124  'parentConfig' => $parentConfig,
125  ],
126  ],
127  GeneralUtility::makeInstance(NodeFactory::class)->create($fileReferenceData)->render()
128  )
129  );
130  }
131 
135  public function ‪detailsAction(ServerRequestInterface $request): ResponseInterface
136  {
137  $arguments = $request->getParsedBody()['ajax'] ?? $request->getQueryParams()['ajax'];
138 
139  $domObjectId = (string)($arguments[0] ?? '');
140  $inlineFirstPid = $this->‪getInlineFirstPidFromDomObjectId($domObjectId);
141  $parentConfig = $this->‪extractSignedParentConfigFromRequest((string)($arguments['context'] ?? ''));
142 
143  $inlineStackProcessor = GeneralUtility::makeInstance(InlineStackProcessor::class);
144  $inlineStackProcessor->initializeByParsingDomObjectIdString($domObjectId);
145  $inlineStackProcessor->setAjaxConfiguration($parentConfig);
146 
147  $parent = $inlineStackProcessor->getStructureLevel(-1);
148  $parentFieldName = $parent['field'];
149 
150  // Set flag in config so that only the fields are rendered
151  // @todo: Solve differently / rename / whatever
152  $parentConfig['renderFieldsOnly'] = true;
153 
154  $parentData = [
155  'processedTca' => [
156  'columns' => [
157  $parentFieldName => [
158  'config' => $parentConfig,
159  ],
160  ],
161  ],
162  'uid' => $parent['uid'],
163  'tableName' => $parent['table'],
164  'inlineFirstPid' => $inlineFirstPid,
165  'returnUrl' => $parentConfig['originalReturnUrl'],
166  ];
167 
168  $fileReference = $inlineStackProcessor->getUnstableStructure();
169  $fileReferenceData = $this->‪compileFileReference(
170  $request,
171  $parentData,
172  $parentFieldName,
173  (int)$fileReference['uid'],
174  $inlineStackProcessor->getStructure()
175  );
176  $fileReferenceData['inlineParentUid'] = (int)$parent['uid'];
177  $fileReferenceData['renderType'] = ‪FileReferenceContainer::NODE_TYPE_IDENTIFIER;
178 
179  return $this->‪jsonResponse(
181  [
182  'data' => '',
183  'stylesheetFiles' => [],
184  'scriptItems' => GeneralUtility::makeInstance(JavaScriptItems::class),
185  ],
186  GeneralUtility::makeInstance(NodeFactory::class)->create($fileReferenceData)->render()
187  )
188  );
189  }
190 
194  public function ‪synchronizeLocalizeAction(ServerRequestInterface $request): ResponseInterface
195  {
196  $arguments = $request->getParsedBody()['ajax'];
197 
198  $domObjectId = (string)($arguments[0] ?? '');
199  $type = $arguments[1] ?? null;
200  $parentConfig = $this->‪extractSignedParentConfigFromRequest((string)($arguments['context'] ?? ''));
201 
202  $inlineStackProcessor = GeneralUtility::makeInstance(InlineStackProcessor::class);
203  $inlineStackProcessor->initializeByParsingDomObjectIdString($domObjectId);
204  $inlineStackProcessor->setAjaxConfiguration($parentConfig);
205  $inlineFirstPid = $this->‪getInlineFirstPidFromDomObjectId($domObjectId);
206 
207  $jsonArray = [
208  'data' => '',
209  'stylesheetFiles' => [],
210  'scriptItems' => GeneralUtility::makeInstance(JavaScriptItems::class),
211  'compilerInput' => [
212  'localize' => [],
213  ],
214  ];
215  if ($type === 'localize' || $type === 'synchronize' || ‪MathUtility::canBeInterpretedAsInteger($type)) {
216  // Parent, this table embeds the sys_file_reference table
217  $parent = $inlineStackProcessor->getStructureLevel(-1);
218  $parentFieldName = $parent['field'];
219 
220  $processedTca = ‪$GLOBALS['TCA'][$parent['table']];
221  $processedTca['columns'][$parentFieldName]['config'] = $parentConfig;
222 
223  $formDataCompilerInputForParent = [
224  'request' => $request,
225  'vanillaUid' => (int)$parent['uid'],
226  'command' => 'edit',
227  'tableName' => $parent['table'],
228  'processedTca' => $processedTca,
229  'inlineFirstPid' => $inlineFirstPid,
230  'columnsToProcess' => [
231  $parentFieldName,
232  ],
233  // @todo: still needed? NO!
234  'inlineStructure' => $inlineStackProcessor->getStructure(),
235  // Do not compile existing file references, we don't need them now
236  'inlineCompileExistingChildren' => false,
237  ];
238  // Full TcaDatabaseRecord is required here to have the list of connected uids $oldItemList
239  $parentData = $this->formDataCompiler->compile($formDataCompilerInputForParent, GeneralUtility::makeInstance(TcaDatabaseRecord::class));
240  $parentLanguageField = $parentData['processedTca']['ctrl']['languageField'];
241  $parentLanguage = $parentData['databaseRow'][$parentLanguageField];
242  $oldItemList = $parentData['databaseRow'][$parentFieldName];
243 
244  // DataHandler cannot handle arrays as field value
245  if (is_array($parentLanguage)) {
246  $parentLanguage = implode(',', $parentLanguage);
247  }
248 
249  $cmd = [];
250  // Localize a single file reference from default language of the parent element
252  $cmd[$parent['table']][$parent['uid']]['inlineLocalizeSynchronize'] = [
253  'field' => $parent['field'],
254  'language' => $parentLanguage,
255  'ids' => [$type],
256  ];
257  } else {
258  // Either localize or synchronize all file references from default language of the parent element
259  $cmd[$parent['table']][$parent['uid']]['inlineLocalizeSynchronize'] = [
260  'field' => $parent['field'],
261  'language' => $parentLanguage,
262  'action' => $type,
263  ];
264  }
265 
266  $tce = GeneralUtility::makeInstance(DataHandler::class);
267  $tce->start([], $cmd);
268  $tce->process_cmdmap();
269 
270  $oldItems = $this->‪getFileReferenceUids((string)$oldItemList);
271 
272  $newItemList = (string)($tce->registerDBList[$parent['table']][$parent['uid']][$parentFieldName] ?? '');
273  $newItems = $this->‪getFileReferenceUids($newItemList);
274 
275  // Render error messages from DataHandler
276  $tce->printLogErrorMessages();
277  $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
278  $messages = $flashMessageService->getMessageQueueByIdentifier()->getAllMessagesAndFlush();
279  if (!empty($messages)) {
280  foreach ($messages as $message) {
281  $jsonArray['messages'][] = [
282  'title' => $message->getTitle(),
283  'message' => $message->getMessage(),
284  'severity' => $message->getSeverity(),
285  ];
286  if ($message->getSeverity() === ContextualFeedbackSeverity::ERROR) {
287  $jsonArray['hasErrors'] = true;
288  }
289  }
290  }
291 
292  // Set the items that should be removed in the forms view:
293  $removedItems = array_diff($oldItems, $newItems);
294  $jsonArray['compilerInput']['delete'] = $removedItems;
295 
296  $localizedItems = array_diff($newItems, $oldItems);
297  foreach ($localizedItems as $i => $localizedFileReferenceUid) {
298  $fileReferenceData = $this->‪compileFileReference($request, $parentData, $parentFieldName, (int)$localizedFileReferenceUid, $inlineStackProcessor->getStructure());
299  $fileReferenceData['inlineParentUid'] = (int)$parent['uid'];
300  $fileReferenceData['renderType'] = ‪FileReferenceContainer::NODE_TYPE_IDENTIFIER;
301 
302  $jsonArray = $this->‪mergeFileReferenceResultIntoJsonResult(
303  $jsonArray,
304  GeneralUtility::makeInstance(NodeFactory::class)->create($fileReferenceData)->render()
305  );
306 
307  // Get the name of the field used as foreign selector (if any):
308  $selectedValue = $fileReferenceData['databaseRow']['uid_local'];
309  if (is_array($selectedValue)) {
310  $selectedValue = $selectedValue[0];
311  }
312 
313  $jsonArray['compilerInput']['localize'][$i] = [
314  'uid' => $localizedFileReferenceUid,
315  'selectedValue' => $selectedValue,
316  ];
317 
318  // Remove possible virtual records in the form which showed that a file reference could be
319  // localized:
320  $transOrigPointerFieldName = $fileReferenceData['processedTca']['ctrl']['transOrigPointerField'];
321  if (isset($fileReferenceData['databaseRow'][$transOrigPointerFieldName]) && $fileReferenceData['databaseRow'][$transOrigPointerFieldName]) {
322  $transOrigPointerFieldValue = $fileReferenceData['databaseRow'][$transOrigPointerFieldName];
323  if (is_array($transOrigPointerFieldValue)) {
324  $transOrigPointerFieldValue = $transOrigPointerFieldValue[0];
325  if (is_array($transOrigPointerFieldValue) && ($transOrigPointerFieldValue['uid'] ?? false)) {
326  $transOrigPointerFieldValue = $transOrigPointerFieldValue['uid'];
327  }
328  }
329  $jsonArray['compilerInput']['localize'][$i]['remove'] = $transOrigPointerFieldValue;
330  }
331  }
332  }
333  return $this->‪jsonResponse($jsonArray);
334  }
335 
339  public function ‪expandOrCollapseAction(ServerRequestInterface $request): ResponseInterface
340  {
341  [$domObjectId, $expand, $collapse] = $request->getParsedBody()['ajax'];
342 
343  $inlineStackProcessor = GeneralUtility::makeInstance(InlineStackProcessor::class);
344  $inlineStackProcessor->initializeByParsingDomObjectIdString($domObjectId);
345 
346  $currentTable = $inlineStackProcessor->getUnstableStructure()['table'];
347  $top = $inlineStackProcessor->getStructureLevel(0);
348  $stateArray = $this->‪getReferenceExpandCollapseStateArray();
349  // Only do some action if the top record and the current record were saved before
351  // Set records to be expanded
352  foreach (‪GeneralUtility::trimExplode(',', $expand) as ‪$uid) {
353  $stateArray[$top['table']][$top['uid']][$currentTable][] = ‪$uid;
354  }
355  // Set records to be collapsed
356  foreach (‪GeneralUtility::trimExplode(',', $collapse) as ‪$uid) {
357  $stateArray[$top['table']][$top['uid']][$currentTable] = $this->‪removeFromArray(
358  $uid,
359  $stateArray[$top['table']][$top['uid']][$currentTable]
360  );
361  }
362  // Save states back to database
363  if (is_array($stateArray[$top['table']][$top['uid']][$currentTable] ?? false)) {
364  $stateArray[$top['table']][$top['uid']][$currentTable] = array_unique($stateArray[$top['table']][$top['uid']][$currentTable]);
365  $backendUser = $this->‪getBackendUserAuthentication();
366  $backendUser->uc['inlineView'] = json_encode($stateArray);
367  $backendUser->writeUC();
368  }
369  }
370  return $this->‪jsonResponse();
371  }
372 
373  protected function ‪compileFileReference(ServerRequestInterface $request, array $parentData, $parentFieldName, $fileReferenceUid, array $inlineStructure): array
374  {
375  $inlineStackProcessor = GeneralUtility::makeInstance(InlineStackProcessor::class);
376  $inlineStackProcessor->initializeByGivenStructure($inlineStructure);
377  $inlineTopMostParent = $inlineStackProcessor->getStructureLevel(0);
378 
379  return $this->formDataCompiler
380  ->compile(
381  [
382  'request' => $request,
383  'command' => 'edit',
384  'tableName' => self::FILE_REFERENCE_TABLE,
385  'vanillaUid' => (int)$fileReferenceUid,
386  'returnUrl' => $parentData['returnUrl'],
387  'isInlineChild' => true,
388  'inlineStructure' => $inlineStructure,
389  'inlineFirstPid' => $parentData['inlineFirstPid'],
390  'inlineParentConfig' => $parentData['processedTca']['columns'][$parentFieldName]['config'],
391  'isInlineAjaxOpeningContext' => true,
392  'inlineParentUid' => $parentData['databaseRow']['uid'] ?? $parentData['uid'],
393  'inlineParentTableName' => $parentData['tableName'],
394  'inlineParentFieldName' => $parentFieldName,
395  'inlineTopMostParentUid' => $inlineTopMostParent['uid'],
396  'inlineTopMostParentTableName' => $inlineTopMostParent['table'],
397  'inlineTopMostParentFieldName' => $inlineTopMostParent['field'],
398  ],
399  GeneralUtility::makeInstance(TcaDatabaseRecord::class)
400  );
401  }
402 
406  protected function ‪mergeFileReferenceResultIntoJsonResult(array $jsonResult, array $fileReferenceData): array
407  {
409  $scriptItems = $jsonResult['scriptItems'];
410 
411  $jsonResult['data'] .= $fileReferenceData['html'];
412  $jsonResult['stylesheetFiles'] = [];
413  foreach ($fileReferenceData['stylesheetFiles'] as $stylesheetFile) {
414  $jsonResult['stylesheetFiles'][] = $this->‪getRelativePathToStylesheetFile($stylesheetFile);
415  }
416  if (!empty($fileReferenceData['inlineData'])) {
417  $jsonResult['inlineData'] = $fileReferenceData['inlineData'];
418  }
419  if (!empty($fileReferenceData['additionalInlineLanguageLabelFiles'])) {
420  $labels = [];
421  foreach ($fileReferenceData['additionalInlineLanguageLabelFiles'] as $additionalInlineLanguageLabelFile) {
422  ArrayUtility::mergeRecursiveWithOverrule(
423  $labels,
424  $this->‪getLabelsFromLocalizationFile($additionalInlineLanguageLabelFile)
425  );
426  }
427  $scriptItems->addGlobalAssignment(['TYPO3' => ['lang' => $labels]]);
428  }
429  $this->‪addJavaScriptModulesToJavaScriptItems($fileReferenceData['javaScriptModules'] ?? [], $scriptItems);
430 
431  return $jsonResult;
432  }
433 
437  protected function ‪getFileReferenceUids(string $itemList): array
438  {
439  $itemArray = ‪GeneralUtility::trimExplode(',', $itemList, true);
440  // Perform modification of the selected items array:
441  foreach ($itemArray as &$value) {
442  $parts = explode('|', $value, 2);
443  $value = $parts[0];
444  }
445  unset($value);
446  return $itemArray;
447  }
448 
452  protected function ‪getReferenceExpandCollapseStateArray(): array
453  {
454  $backendUser = $this->‪getBackendUserAuthentication();
455  if (empty($backendUser->uc['inlineView'])) {
456  return [];
457  }
458 
459  $state = json_decode($backendUser->uc['inlineView'], true);
460  if (!is_array($state)) {
461  $state = [];
462  }
463 
464  return $state;
465  }
466 
470  protected function ‪removeFromArray(mixed $needle, array $haystack, bool $strict = false): array
471  {
472  $pos = array_search($needle, $haystack, $strict);
473  if ($pos !== false) {
474  unset($haystack[$pos]);
475  }
476  return $haystack;
477  }
478 
482  protected function ‪getInlineFirstPidFromDomObjectId(string $domObjectId): int|string|null
483  {
484  // Substitute FlexForm addition and make parsing a bit easier
485  $domObjectId = str_replace('---', ':', $domObjectId);
486  // The starting pattern of an object identifier (e.g. "data-<firstPidValue>-<anything>)
487  $pattern = '/^data-(.+?)-(.+)$/';
488  if (preg_match($pattern, $domObjectId, $match)) {
489  return $match[1];
490  }
491  return null;
492  }
493 
498  protected function ‪extractSignedParentConfigFromRequest(string $contextString): array
499  {
500  if ($contextString === '') {
501  throw new \RuntimeException('Empty context string given', 1664486783);
502  }
503  $context = json_decode($contextString, true);
504  if (empty($context['config'])) {
505  throw new \RuntimeException('Empty context config section given', 1664486790);
506  }
507  if (!hash_equals(‪GeneralUtility::hmac((string)$context['config'], 'FilesContext'), (string)$context['hmac'])) {
508  throw new \RuntimeException('Hash does not validate', 1664486791);
509  }
510  return json_decode($context['config'], true);
511  }
512 
513  protected function ‪jsonResponse(array $json = []): ResponseInterface
514  {
515  return $this->responseFactory->createResponse()
516  ->withHeader('Content-Type', 'application/json; charset=utf-8')
517  ->withBody($this->streamFactory->createStream((string)json_encode($json)));
518  }
519 
521  {
522  return ‪$GLOBALS['BE_USER'];
523  }
524 }
‪TYPO3\CMS\Core\DataHandling\DataHandler
Definition: DataHandler.php:94
‪TYPO3\CMS\Backend\Controller\FormFilesAjaxController\removeFromArray
‪removeFromArray(mixed $needle, array $haystack, bool $strict=false)
Definition: FormFilesAjaxController.php:470
‪TYPO3\CMS\Backend\Controller\FormFilesAjaxController\mergeFileReferenceResultIntoJsonResult
‪mergeFileReferenceResultIntoJsonResult(array $jsonResult, array $fileReferenceData)
Definition: FormFilesAjaxController.php:406
‪TYPO3\CMS\Backend\Controller\FormFilesAjaxController\expandOrCollapseAction
‪expandOrCollapseAction(ServerRequestInterface $request)
Definition: FormFilesAjaxController.php:339
‪TYPO3\CMS\Backend\Controller\FormFilesAjaxController
Definition: FormFilesAjaxController.php:44
‪TYPO3\CMS\Backend\Controller\FormFilesAjaxController\synchronizeLocalizeAction
‪synchronizeLocalizeAction(ServerRequestInterface $request)
Definition: FormFilesAjaxController.php:194
‪TYPO3\CMS\Backend\Form\Container\FileReferenceContainer
Definition: FileReferenceContainer.php:50
‪TYPO3\CMS\Backend\Controller\FormFilesAjaxController\getReferenceExpandCollapseStateArray
‪getReferenceExpandCollapseStateArray()
Definition: FormFilesAjaxController.php:452
‪TYPO3\CMS\Core\Type\ContextualFeedbackSeverity
‪ContextualFeedbackSeverity
Definition: ContextualFeedbackSeverity.php:25
‪TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger
‪static bool canBeInterpretedAsInteger(mixed $var)
Definition: MathUtility.php:69
‪TYPO3\CMS\Backend\Controller\AbstractFormEngineAjaxController\getLabelsFromLocalizationFile
‪array getLabelsFromLocalizationFile(string $file)
Definition: AbstractFormEngineAjaxController.php:78
‪TYPO3\CMS\Backend\Controller\AbstractFormEngineAjaxController\getRelativePathToStylesheetFile
‪string getRelativePathToStylesheetFile(string $stylesheetFile)
Definition: AbstractFormEngineAjaxController.php:59
‪TYPO3\CMS\Backend\Controller\FormFilesAjaxController\getBackendUserAuthentication
‪getBackendUserAuthentication()
Definition: FormFilesAjaxController.php:520
‪TYPO3\CMS\Core\Utility\GeneralUtility\hmac
‪static string hmac($input, $additionalSecret='')
Definition: GeneralUtility.php:474
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
Definition: BackendUserAuthentication.php:61
‪TYPO3\CMS\Backend\Controller\AbstractFormEngineAjaxController\addJavaScriptModulesToJavaScriptItems
‪addJavaScriptModulesToJavaScriptItems(array $modules, JavaScriptItems $items)
Definition: AbstractFormEngineAjaxController.php:36
‪TYPO3\CMS\Backend\Controller\FormFilesAjaxController\extractSignedParentConfigFromRequest
‪extractSignedParentConfigFromRequest(string $contextString)
Definition: FormFilesAjaxController.php:498
‪TYPO3\CMS\Backend\Form\NodeFactory
Definition: NodeFactory.php:40
‪TYPO3\CMS\Backend\Controller\FormFilesAjaxController\jsonResponse
‪jsonResponse(array $json=[])
Definition: FormFilesAjaxController.php:513
‪TYPO3\CMS\Webhooks\Message\$uid
‪identifier readonly int $uid
Definition: PageModificationMessage.php:35
‪TYPO3\CMS\Backend\Controller\FormFilesAjaxController\FILE_REFERENCE_TABLE
‪const FILE_REFERENCE_TABLE
Definition: FormFilesAjaxController.php:45
‪TYPO3\CMS\Backend\Controller\FormFilesAjaxController\getInlineFirstPidFromDomObjectId
‪getInlineFirstPidFromDomObjectId(string $domObjectId)
Definition: FormFilesAjaxController.php:482
‪TYPO3\CMS\Core\Utility\ArrayUtility
Definition: ArrayUtility.php:26
‪TYPO3\CMS\Backend\Form\Container\FileReferenceContainer\NODE_TYPE_IDENTIFIER
‪const NODE_TYPE_IDENTIFIER
Definition: FileReferenceContainer.php:51
‪TYPO3\CMS\Backend\Controller\FormFilesAjaxController\createAction
‪createAction(ServerRequestInterface $request)
Definition: FormFilesAjaxController.php:56
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Core\Utility\MathUtility
Definition: MathUtility.php:24
‪TYPO3\CMS\Backend\Attribute\AsController
Definition: AsController.php:25
‪TYPO3\CMS\Backend\Controller\AbstractFormEngineAjaxController
Definition: AbstractFormEngineAjaxController.php:35
‪TYPO3\CMS\Backend\Form\InlineStackProcessor
Definition: InlineStackProcessor.php:32
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:52
‪TYPO3\CMS\Backend\Form\FormDataCompiler
Definition: FormDataCompiler.php:26
‪TYPO3\CMS\Backend\Form\FormDataGroup\TcaDatabaseRecord
Definition: TcaDatabaseRecord.php:25
‪TYPO3\CMS\Backend\Controller\FormFilesAjaxController\__construct
‪__construct(private readonly ResponseFactoryInterface $responseFactory, private readonly StreamFactoryInterface $streamFactory, private readonly FormDataCompiler $formDataCompiler,)
Definition: FormFilesAjaxController.php:47
‪TYPO3\CMS\Backend\Controller
Definition: AboutController.php:18
‪TYPO3\CMS\Backend\Controller\FormFilesAjaxController\compileFileReference
‪compileFileReference(ServerRequestInterface $request, array $parentData, $parentFieldName, $fileReferenceUid, array $inlineStructure)
Definition: FormFilesAjaxController.php:373
‪TYPO3\CMS\Core\Messaging\FlashMessageService
Definition: FlashMessageService.php:27
‪TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode
‪static list< string > trimExplode(string $delim, string $string, bool $removeEmptyValues=false, int $limit=0)
Definition: GeneralUtility.php:817
‪TYPO3\CMS\Backend\Controller\FormFilesAjaxController\detailsAction
‪detailsAction(ServerRequestInterface $request)
Definition: FormFilesAjaxController.php:135
‪TYPO3\CMS\Backend\Controller\FormFilesAjaxController\getFileReferenceUids
‪getFileReferenceUids(string $itemList)
Definition: FormFilesAjaxController.php:437