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