Files
typo3-13/packages/ep_theme/Configuration/TCA/Overrides/pages.php
T
frommeandClaude Opus 5.5 ecd5ea66c5 refactor: type declarations via Rector
rector.php gets the typeDeclarations set: return types (void, array,
unions) where the code proves them, typed closures and arrow functions,
typed properties from constructors and assignments in the DTOs.

Skipped: rules that infer scalar or array parameter types from call
sites or docblocks, and the removal of casts the docblocks call
redundant. Values from the database, form input and the import feeds
arrive as strings and would throw instead of being converted (e.g. the
(int) cast of the newsletter list ids stays).

Checked locally: cache warmup, frontend crawl (~1,900 URLs), the
backchannel APIs and the newsletter form validation behave as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 11:21:12 +01:00

160 lines
4.8 KiB
PHP

<?php
declare(strict_types=1);
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
defined('TYPO3') || die();
call_user_func(function(): void {
$temporaryColumns = [
'tx_eptheme_context_pacode' => [
'exclude' => 0,
'label' => 'PA Code für diese Seite',
'config' => [
'type' => 'input',
'size' => 8,
'eval' => 'trim',
],
],
'tx_eptheme_context_country_code' => [
'config' => [
'type' => 'passthrough'
],
],
'tx_eptheme_context_country' => [
'exclude' => 0,
'label' => 'Land',
'config' => [
'type' => 'select',
'default' => 0,
'renderType' => 'selectSingle',
'foreign_table' => 'tx_epproducts_domain_model_country',
'foreign_table_where' => 'ORDER BY name',
'items' => [
['label' => 'Keine Zuordnung', 'value' => 0],
],
'minitems' => 0,
'maxitems' => 1,
]
],
'tx_eptheme_context_region' => [
'exclude' => 0,
'label' => 'Gebiet',
'config' => [
'type' => 'select',
'default' => 0,
'renderType' => 'selectSingle',
'foreign_table' => 'tx_epproducts_domain_model_region',
'foreign_table_where' => 'ORDER BY name',
'items' => [
['label' => 'Keine Zuordnung', 'value' => 0],
],
'minitems' => 0,
'maxitems' => 1,
]
],
'tx_eptheme_hide_searchbar' => [
'exclude' => 0,
'label' => 'Suchschlitz NICHT anzeigen',
'config' => [
'type' => 'check'
]
],
'tx_eptheme_new_tab' => [
'exclude' => 0,
'label' => 'Seite in neuem Tab/Fenster öffnen',
'config' => [
'type' => 'check'
]
],
'tx_eptheme_bodyclass' => [
'exclude' => 0,
'label' => 'CSS Klasse(n) für Body Tag',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
]
],
'tx_eptheme_navitemclass' => [
'exclude' => 0,
'label' => 'CSS Klasse(n) für Topnavigation',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
]
],
'tx_eptheme_slides' => [
'exclude' => 0,
'label' => 'Slides',
'displayCond' => 'FIELD:backend_layout:!IN:pagets__detail,pagets__booking',
'config' => [
'type' => 'inline',
'foreign_table' => 'tx_eptheme_domain_model_slide',
'foreign_field' => 'page',
'foreign_sortby' => 'sorting',
'maxitems' => 5,
'appearance' => [
'useSortable' => 1,
'collapseAll' => 1,
'levelLinksPosition' => 'top',
'showSynchronizationLink' => 0,
'showPossibleLocalizationRecords' => 0,
'showAllLocalizationLink' => 0
],
],
],
'tx_eptheme_badge' => [
'exclude' => 0,
'label' => 'Badge',
'config' => [
'type' => 'select',
'default' => 0,
'renderType' => 'selectSingle',
'foreign_table' => 'tx_epproducts_domain_model_badge',
'foreign_table_where' => 'ORDER BY title',
'items' => [
['label' => 'Keine Zuordnung', 'value' => 0],
],
'minitems' => 0,
'maxitems' => 1,
],
],
];
ExtensionManagementUtility::addTCAcolumns(
'pages',
$temporaryColumns
);
ExtensionManagementUtility::addToAllTCAtypes(
'pages',
'--div--;Kontext,
tx_eptheme_context_pacode,tx_eptheme_context_country,tx_eptheme_context_region,
tx_eptheme_hide_searchbar,tx_eptheme_new_tab,tx_eptheme_bodyclass,tx_eptheme_navitemclass,
--div--;Slider,
tx_eptheme_slides,
--div--;Badge,
tx_eptheme_badge',
'1,4'
);
ExtensionManagementUtility::registerPageTSConfigFile(
'ep_theme',
'Configuration/TSconfig/Page/Main.tsconfig',
'EP Theme'
);
$GLOBALS['TCA']['pages']['columns']['slug']['config']['generatorOptions']['fields'] = [
[
'nav_title',
'title'
]
];
});