ds-site/Configuration/TCA/Overrides/pages.php

53 lines
1.4 KiB
PHP
Raw Normal View History

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: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], [
'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
],
],
'lastUpdated' => [
2019-12-13 12:35:05 +01:00
'label' => $languagePath . 'lastUpdated',
'config' => [
'eval' => 'date,int',
],
],
'description' => [
'config' => [
'max' => 200,
],
],
],
]);
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'
);
})('ds_site', 'pages');