appearance

appearance
Type:array
Scope:Display
InternalType:all

Options for refining the appearance of group-type fields. This property is automatically used for FAL relations created by the function ExtensionManagementUtility::getFileFieldTCAConfig.

elementBrowserType (string)
Allows set an alternative element browser type (“db” or “file”) than would otherwise be rendered based on the “internal_type” setting. This is used internally for FAL file fields, where internal_type is “db” but the element browser should be the file element browser anyway.
elementBrowserAllowed (string)
Makes it possible to set an alternative element browser allowed string than would otherwise be taken from the “allowed” setting of this field. This is used internally for FAL file fields, where this is used to supply the comma list of allowed file types.

Examples

../../../../_images/InlineFalInline1.png
'columns' => [
    'inline_1' => [
        'exclude' => 1,
        'label' => 'inline_1 typical fal image',
        'config' => [
            'type' => 'inline',
            'foreign_table' => 'sys_file_reference',
            'foreign_field' => 'uid_foreign',
            'foreign_sortby' => 'sorting_foreign',
            'foreign_table_field' => 'tablenames',
            'foreign_match_fields' => [
                'fieldname' => 'inline_1',
            ],
            'foreign_label' => 'uid_local',
            'foreign_selector' => 'uid_local',
            'overrideChildTca' => [
                'columns' => [
                    'uid_local' => [
                        'config' => [
                            'appearance' => [
                                'elementBrowserType' => 'file',
                                'elementBrowserAllowed' => 'gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai,svg',
                            ],
                        ],
                    ],
                    'crop' => [
                        'description' => 'field description',
                    ],
                ],
                'types' => [
                    2 => [
                        'showitem' => '
                                --palette--;;imageoverlayPalette,
                                --palette--;;filePalette',
                    ],
                ],
            ],
            'filter' => [
                [
                    'userFunc' => 'TYPO3\\CMS\\Core\\Resource\\Filter\\FileExtensionFilter->filterInlineChildren',
                    'parameters' => [
                        'allowedFileExtensions' => 'gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai,svg',
                        'disallowedFileExtensions' => '',
                    ],
                ],
            ],
            'appearance' => [
                'useSortable' => true,
                'headerThumbnail' => [
                    'field' => 'uid_local',
                    'height' => '45m',
                ],
                'enabledControls' => [
                    'info' => true,
                    'new' => false,
                    'dragdrop' => true,
                    'sort' => false,
                    'hide' => true,
                    'delete' => true,
                ],
                'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference',
            ],
        ],
    ],
]

Where ExtensionManagementUtility::getFileFieldTCAConfig internally creates an array like this:

$fileFieldTCAConfig = [
   'type' => 'inline',
   'foreign_table' => 'sys_file_reference',
   'foreign_field' => 'uid_foreign',
   'foreign_sortby' => 'sorting_foreign',
   'foreign_table_field' => 'tablenames',
   'foreign_match_fields' => [
      'fieldname' => $fieldName
   ],
   'foreign_label' => 'uid_local',
   'foreign_selector' => 'uid_local',
   'overrideChildTca' => [
      'columns' => [
         'uid_local' => [
            'config' => [
               'appearance' => [
                  'elementBrowserType' => 'file',
                  'elementBrowserAllowed' => $allowedFileExtensions
               ],
            ],
         ],
      ],
   ],
   'filter' => [
      [
         'userFunc' => 'TYPO3\\CMS\\Core\\Resource\\Filter\\FileExtensionFilter->filterInlineChildren',
         'parameters' => [
            'allowedFileExtensions' => $allowedFileExtensions,
            'disallowedFileExtensions' => $disallowedFileExtensions
         ]
      ]
   ],
   'appearance' => [
      'useSortable' => true,
      'headerThumbnail' => [
         'field' => 'uid_local',
         'width' => '45',
         'height' => '45c',
      ],
      'showPossibleLocalizationRecords' => false,
      'showSynchronizationLink' => false,
      'showAllLocalizationLink' => false,

      'enabledControls' => [
         'info' => false,
         'new' => false,
         'dragdrop' => true,
         'sort' => false,
         'hide' => true,
         'delete' => true,
         'localize' => true,
      ],
   ],
];