Checkpoint: headless JSON architecture documented + cleanup (Stufe 1+2)

Restore point before Stufe 3 (central resolver-service refactoring).

Includes this session's work:
- Success Story (usecase) rebuild: new fields/tabs, UsecaseSerializer,
  thin List/Show renderers, MM relations, inline content elements.
- vitec_columns content block (two-column layout with per-item content)
  incl. unified header section; special-cased JSON resolution.
- Container per-column flex (items[].config align/justify) + gap on parent.
- Unified header section across CEs/plugins/containers; header fields in JSON.
- ISO-style architecture spec: Documentation/Headless-JSON-Architecture.md.
- Cleanup: removed local scratch + verified .bak backups.
- Fixes: B-6 (undefined thumbnail variable in Downloadcardcollection image
  resolver), B-7 (unsatisfiable legacy CType OR branch in Downloadcard/Datasheets).

Rollback: git reset --hard snapshot-2026-07-09-pre-stufe3

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
o-rascheandClaude Opus 4.8 committed 2026-07-09 10:01:56 +02:00
1 parent c6759186cb
commit bb7c03235d
237 files changed
+6698 -1749

No files matched your search

+81
View File
@@ -27,6 +27,87 @@ use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
],
]);
// -------------------------------------------------------------------------
// Shared parent-level setting: column gap scale (1–5) for the whole grid.
// Concerns the container itself (not a single column); maps to a spacing
// token in the React frontend. Rendered in the "Grid" palette on top of the
// Appearance tab, above the per-column rows.
// -------------------------------------------------------------------------
ExtensionManagementUtility::addTCAcolumns('tt_content', [
'tx_vitec_gap' => [
'label' => $l . 'gap.label',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'items' => [
['label' => $l . 'gap.option.1', 'value' => '1'],
['label' => $l . 'gap.option.2', 'value' => '2'],
['label' => $l . 'gap.option.3', 'value' => '3'],
['label' => $l . 'gap.option.4', 'value' => '4'],
['label' => $l . 'gap.option.5', 'value' => '5'],
],
'default' => '3',
],
],
]);
// Parent-element palette: settings that concern the whole grid, not a column.
$GLOBALS['TCA']['tt_content']['palettes']['vitec_grid'] = [
'showitem' => 'tx_vitec_gap',
];
// -------------------------------------------------------------------------
// Shared per-column flex alignment fields for the X-column containers.
// Positional: col1 = first column, col2 = second, ... (max 4 columns).
// "Align" -> CSS align-items (cross-axis alignment of the column's items)
// "Justify" -> CSS justify-content (main-axis distribution within the column)
// Reused across vitec_cols_50_50 / 33_66 / 66_33 / 33_33_33 / 25_25_25_25.
// -------------------------------------------------------------------------
$alignItems = [
['label' => $l . 'flex.align.flex_start', 'value' => 'flex-start'],
['label' => $l . 'flex.align.center', 'value' => 'center'],
['label' => $l . 'flex.align.flex_end', 'value' => 'flex-end'],
['label' => $l . 'flex.align.stretch', 'value' => 'stretch'],
];
$justifyItems = [
['label' => $l . 'flex.justify.flex_start', 'value' => 'flex-start'],
['label' => $l . 'flex.justify.center', 'value' => 'center'],
['label' => $l . 'flex.justify.space_between', 'value' => 'space-between'],
['label' => $l . 'flex.justify.space_around', 'value' => 'space-around'],
['label' => $l . 'flex.justify.space_evenly', 'value' => 'space-evenly'],
];
$columnFields = [];
for ($i = 1; $i <= 4; $i++) {
$columnFields['tx_vitec_col' . $i . '_align'] = [
'label' => $l . 'flex.align.label',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'items' => $alignItems,
'default' => 'stretch',
],
];
$columnFields['tx_vitec_col' . $i . '_justify'] = [
'label' => $l . 'flex.justify.label',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'items' => $justifyItems,
'default' => 'flex-start',
],
];
}
ExtensionManagementUtility::addTCAcolumns('tt_content', $columnFields);
// One palette per column: Align + Justify on a single row. The visible row
// label is overridden per container in its showitem (--palette--;<colLabel>;<palette>).
for ($i = 1; $i <= 4; $i++) {
$GLOBALS['TCA']['tt_content']['palettes']['vitec_col' . $i . '_flex'] = [
'showitem' => 'tx_vitec_col' . $i . '_align, tx_vitec_col' . $i . '_justify',
];
}
// Register VITEC wizard group header
$GLOBALS['TYPO3_CONF_VARS']['BE']['defaultPageTSconfig'] = ($GLOBALS['TYPO3_CONF_VARS']['BE']['defaultPageTSconfig'] ?? '') . "\n" . <<<'TSCONFIG'
mod.wizards.newContentElement.wizardItems.vitec {