2019-11-13 23:40:26 +01:00
|
|
|
<?php
|
|
|
|
|
2024-02-08 08:04:56 +01:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
use TYPO3\CMS\Core\Domain\Repository\PageRepository;
|
|
|
|
use TYPO3\CMS\Core\Utility\ArrayUtility;
|
|
|
|
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
|
|
|
|
|
|
|
|
(static function (string $extensionKey, string $tableName) {
|
|
|
|
ExtensionManagementUtility::registerPageTSConfigFile(
|
2019-11-13 23:40:26 +01:00
|
|
|
$extensionKey,
|
|
|
|
'Configuration/PageTSconfig/Index.tsconfig',
|
|
|
|
$extensionKey
|
|
|
|
);
|
2019-12-13 12:11:32 +01:00
|
|
|
|
2019-12-13 12:35:05 +01: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], [
|
2019-12-13 12:11:32 +01:00
|
|
|
'columns' => [
|
2022-01-05 10:17:11 +01:00
|
|
|
'rel' => [
|
|
|
|
'label' => 'rel Attribute of generated a Tag',
|
|
|
|
'config' => [
|
|
|
|
'type' => 'input',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'url' => [
|
|
|
|
'config' => [
|
2022-12-06 08:18:42 +01:00
|
|
|
'type' => 'link',
|
2022-01-05 10:17:11 +01:00
|
|
|
],
|
|
|
|
],
|
2019-12-13 12:11:32 +01:00
|
|
|
'lastUpdated' => [
|
2019-12-13 12:35:05 +01:00
|
|
|
'label' => $languagePath . 'lastUpdated',
|
2019-12-13 12:11:32 +01:00
|
|
|
'config' => [
|
|
|
|
'eval' => 'date,int',
|
|
|
|
],
|
|
|
|
],
|
2021-01-22 12:38:40 +01:00
|
|
|
'description' => [
|
|
|
|
'config' => [
|
|
|
|
'max' => 200,
|
|
|
|
],
|
|
|
|
],
|
2019-12-13 12:11:32 +01:00
|
|
|
],
|
|
|
|
]);
|
2021-01-22 12:38:40 +01:00
|
|
|
|
2024-02-08 08:04:56 +01:00
|
|
|
ExtensionManagementUtility::addToAllTCAtypes(
|
2022-01-05 10:17:11 +01:00
|
|
|
$tableName,
|
|
|
|
'rel',
|
2024-02-08 08:04:56 +01:00
|
|
|
(string) PageRepository::DOKTYPE_LINK,
|
2022-01-05 10:17:11 +01:00
|
|
|
'after:url'
|
|
|
|
);
|
|
|
|
|
2019-12-13 12:11:32 +01:00
|
|
|
})('ds_site', 'pages');
|