是否可以在我的typo3 扩展中扩展媒体类型?默认字段是替代、标题、描述。如何添加自己的字段?
$GLOBALS['TCA']['tt_content']['types']['my_slider'] = [
'showitem' => '
--palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
--palette--;' . $languageFilePrefix . 'tt_content.palette.mediaAdjustments;mediaAdjustments,
pi_flexform,
--div--;' . $customLanguageFilePrefix . 'tca.tab.sliderElements,
assets
',
'columnsOverrides' => [
'media' => [
'label' => $languageFilePrefix . 'tt_content.media_references',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('media', [
'appearance' => [
'createNewRelationLinkTitle' => $languageFilePrefix . 'tt_content.media_references.addFileReference'
],
// custom configuration for displaying fields in the overlay/reference table
// behaves the same as the image field.
'foreign_types' => $GLOBALS['TCA']['tt_content']['columns']['image']['config']['foreign_types']
], $GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext'])
]
]
];