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>
30 lines
900 B
PHP
30 lines
900 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace Evomedien\Vitec\View;
|
|
|
|
use TYPO3\CMS\Backend\Utility\BackendUtility;
|
|
use TYPO3\CMS\Backend\View\BackendLayoutView;
|
|
|
|
/**
|
|
* Overrides BackendLayoutView so the page module always reflects pages.layout
|
|
* without the editor having to set backend_layout manually.
|
|
*/
|
|
final readonly class VitecBackendLayoutView extends BackendLayoutView
|
|
{
|
|
public function getSelectedCombinedIdentifier(int $pageId): string|false
|
|
{
|
|
if ($pageId <= 0) {
|
|
return parent::getSelectedCombinedIdentifier($pageId);
|
|
}
|
|
|
|
$page = BackendUtility::getRecord('pages', $pageId, 'layout');
|
|
if (!is_array($page) || !isset($page['layout'])) {
|
|
return parent::getSelectedCombinedIdentifier($pageId);
|
|
}
|
|
|
|
// Combined identifier format: "<dataProvider>__<layoutId>"
|
|
return 'vitec__' . (int)$page['layout'];
|
|
}
|
|
}
|