2020-08-21 12:43:33 +02:00
|
|
|
<?php
|
|
|
|
|
2024-02-08 08:04:56 +01:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
use TYPO3\CMS\Core\Utility\ArrayUtility;
|
|
|
|
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
|
|
|
|
|
|
|
|
(static function (string $extensionKey, string $tableName) {
|
2020-08-21 12:43:33 +02:00
|
|
|
$languagePath = 'LLL:EXT:' . $extensionKey . '/Resources/Private/Language/locallang_tca.xlf:' . $tableName . '.';
|
|
|
|
|
2024-02-08 08:04:56 +01:00
|
|
|
ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA'][$tableName], [
|
2020-08-21 12:43:33 +02:00
|
|
|
'columns' => [
|
|
|
|
'youtube' => [
|
|
|
|
'label' => $languagePath . 'youtube',
|
|
|
|
'config' => [
|
|
|
|
'type' => 'input',
|
|
|
|
'eval' => 'trim',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'poster' => [
|
|
|
|
'label' => $languagePath . 'poster',
|
2022-12-06 08:18:42 +01:00
|
|
|
'config' => [
|
|
|
|
'type' => 'file',
|
|
|
|
'maxitems' => 1,
|
2024-02-08 08:04:56 +01:00
|
|
|
'allowed' => 'common-image-types',
|
2022-12-06 08:18:42 +01:00
|
|
|
],
|
2020-08-21 12:43:33 +02:00
|
|
|
],
|
|
|
|
],
|
|
|
|
]);
|
|
|
|
|
2024-02-08 08:04:56 +01:00
|
|
|
ExtensionManagementUtility::addToAllTCAtypes(
|
2020-08-21 12:43:33 +02:00
|
|
|
$tableName,
|
|
|
|
'youtube, poster',
|
|
|
|
'',
|
|
|
|
'after:title'
|
|
|
|
);
|
|
|
|
})('ds_site', 'sys_file_metadata');
|