extension_builder
extension_builder copied to clipboard
formatting in TCA files
Is your feature request related to a problem? Please describe. Reading and editing types or palettes in TCA files might by nature a bit difficult but it could be easier by different formatting.
Describe the solution you'd like A self-explanatory example is this:
'types' => [
'1' => ['showitem' =>
'title,'
. 'sub_title,'
. 'description,'
. 'image,'
. 'category,'
. '--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,'
. 'sys_language_uid,'
. 'l10n_parent,'
. 'l10n_diffsource,'
. '--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,'
. 'hidden,'
. 'starttime,'
. 'endtime'
],
],
It's easier to resort, to en- or disable fields and to add detailed configuration for tabs and each field.
Alternatives: configuration in an array which is imploded then. This would avoid comma-faults based on resorting
$types_1_showitem = [
'title',
'sub_title',
'description',
'image',
'category',
'--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language',
'sys_language_uid',
'l10n_parent',
'l10n_diffsource',
'--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access',
'hidden',
'starttime',
'endtime',
];
return [
'ctrl' => [...],
'types' => [
'1' => ['showitem' => implode(',', $types_1_showitem]),
],
'columns' => [...],
]