2 declare(strict_types = 1);
42 $table = $this->data[
'tableName'];
43 $fieldName = $this->data[
'fieldName'];
44 $row = $this->data[
'databaseRow'];
45 $parameterArray = $this->data[
'parameterArray'];
46 $config = $parameterArray[
'fieldConf'][
'config'];
47 $selectedItems = $parameterArray[
'itemFormElValue'];
49 if (!isset($config[
'internal_type'])
50 || ($config[
'internal_type'] !==
'file' && $config[
'internal_type'] !==
'file_reference')
59 foreach ($selectedItems as $selectedItem) {
60 $uidOrPath = $selectedItem[
'uidOrPath'];
62 $fileObject = $fileFactory->getFileObject($uidOrPath);
63 if (!$fileObject->isMissing()) {
64 $extension = $fileObject->getExtension();
65 if (GeneralUtility::inList(
66 $GLOBALS[
'TYPO3_CONF_VARS'][
'GFX'][
'imagefile_ext'],
70 $thumbnailsHtml[] =
'<li>';
71 $thumbnailsHtml[] =
'<span class="thumbnail">';
73 $thumbnailsHtml[] =
'</span>';
74 $thumbnailsHtml[] =
'</li>';
79 $rowCopy[$fieldName] = $uidOrPath;
87 $config[
'uploadfolder'],
93 .
'<span class="thumbnail">'
98 $message = $exception->getMessage();
99 $flashMessage = GeneralUtility::makeInstance(
106 $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
107 $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
108 $defaultFlashMessageQueue->enqueue($flashMessage);
109 $this->logger->warning($message, [
'table' => $table,
'row' => $row]);
115 if (!empty($thumbnailsHtml)) {
116 $html[] =
'<ul class="list-inline">';
117 $html[] = implode(LF, $thumbnailsHtml);
121 $result[
'html'] = implode(LF, $html);