2 declare(strict_types = 1);
40 $fieldName = $this->data[
'fieldName'];
41 $fieldConfig = $this->data[
'processedTca'][
'columns'][$fieldName];
42 $l10nDisplay = $this->data[
'parameterArray'][
'fieldConf'][
'l10n_display'] ??
'';
43 $defaultLanguageRow = $this->data[
'defaultLanguageRow'] ??
null;
44 if (!is_array($defaultLanguageRow)
45 || GeneralUtility::inList($l10nDisplay,
'hideDiff')
46 || GeneralUtility::inList($l10nDisplay,
'defaultAsReadonly')
47 || $fieldConfig[
'config'][
'type'] ===
'inline'
48 || $fieldConfig[
'config'][
'type'] ===
'flex'
49 || ($fieldConfig[
'config'][
'type'] ===
'group' && isset($fieldConfig[
'config'][
'MM']))
50 || ($fieldConfig[
'config'][
'type'] ===
'select' && isset($fieldConfig[
'config'][
'MM']))
56 $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
57 $table = $this->data[
'tableName'];
62 $defaultLanguageRow[$fieldName],
66 $defaultLanguageRow[
'uid'],
68 $defaultLanguageRow[
'pid']
70 if ($defaultLanguageValue !==
'') {
71 $iconIdentifier = $this->data[
'systemLanguageRows'][0][
'flagIconIdentifier'] ?:
'flags-multiple';
72 $html[] =
'<div class="t3-form-original-language">';
77 $additionalPreviewLanguages = $this->data[
'additionalLanguageRows'];
78 foreach ($additionalPreviewLanguages as $previewLanguage) {
82 $previewLanguage[$fieldName],
86 if ($defaultLanguageValue !==
'') {
87 $html[] =
'<div class="t3-form-original-language">';
88 $html[] = $iconFactory->getIcon($this->data[
'systemLanguageRows'][$previewLanguage[
'sys_language_uid']][
'flagIconIdentifier'],
Icon::SIZE_SMALL)->render();
93 $result[
'html'] = implode(LF, $html);
108 $value = (string)$value;
109 if ($config[
'config'][
'type'] ===
'group'
110 && ($config[
'config'][
'internal_type'] ===
'file' || $config[
'config'][
'internal_type'] ===
'file_reference')
113 if ($config[
'config'][
'internal_type'] ===
'file_reference') {
114 $config[
'config'][
'uploadfolder'] =
'';
116 $table =
'tt_content';
118 $itemArray = GeneralUtility::trimExplode(
',', $value,
true);
121 $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
122 foreach ($itemArray as $imgRead) {
123 $imgParts = explode(
'|', $imgRead);
124 $imgPath = rawurldecode($imgParts[0]);
126 $rowCopy[$field] = $imgPath;
128 $absFilePath = GeneralUtility::getFileAbsFileName($config[
'config'][
'uploadfolder'] ? $config[
'config'][
'uploadfolder'] .
'/' . $imgPath : $imgPath);
129 $fileInformation = pathinfo($imgPath);
130 $title = $fileInformation[
'basename'] . ($absFilePath && @is_file($absFilePath))
131 ?
' (' . GeneralUtility::formatSize(filesize($absFilePath)) .
')'
132 :
' - FILE NOT FOUND!';
133 $fileIcon =
'<span title="' . htmlspecialchars($title) .
'">' . $iconFactory->getIconForFileExtension($fileInformation[
'extension'],
Icon::SIZE_SMALL)->render() .
'</span>';
135 '<span class="text-nowrap">' .
142 $config[
'config'][
'uploadfolder'],
150 return implode(
'<br />', $imgs);
152 return nl2br(htmlspecialchars($value));