33 lines
1 KiB
PHP
33 lines
1 KiB
PHP
|
|
<?php
|
|
|
|
(function (string $extensionKey, string $tableName) {
|
|
$languagePath = 'LLL:EXT:' . $extensionKey . '/Resources/Private/Language/locallang_tca.xlf:' . $tableName . '.';
|
|
|
|
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA'][$tableName], [
|
|
'columns' => [
|
|
'youtube' => [
|
|
'label' => $languagePath . 'youtube',
|
|
'config' => [
|
|
'type' => 'input',
|
|
'eval' => 'trim',
|
|
],
|
|
],
|
|
'poster' => [
|
|
'label' => $languagePath . 'poster',
|
|
'config' => [
|
|
'type' => 'file',
|
|
'maxitems' => 1,
|
|
'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],
|
|
],
|
|
],
|
|
],
|
|
]);
|
|
|
|
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
|
|
$tableName,
|
|
'youtube, poster',
|
|
'',
|
|
'after:title'
|
|
);
|
|
})('ds_site', 'sys_file_metadata');
|