Files
orascheandClaude Fable 5.1 4bc38b1760 Product content check as page content (vitec_productcheck)
The product audit of public/product-check/ becomes data for the React frontend: new content element vitec_productcheck (plugin registration, wizard entry, TypoScript USER func) delivers under content.productcheck either the overview (every product with one {ok,count} check per field - hero, photos, og, video, teaser, subtitle, description, description2, highlights, capabilities, applications, features incl. icon count, resources, datasheets, solutions - plus per-field summary) or, with ?check=<uid>, the detail of one product (texts as stored HTML, images with original URL and 480px thumbnail, videos, feature cards with icons, resources, datasheets, solutions). ProductCheckService ports the PDO queries of the standalone page to Doctrine; the renderer is always USER_INT so the audit is never served from the page cache; check is excluded from the cHash. Migration adds the element to page 607 (/products/product-check). The standalone page stays untouched. Verified on DEV: overview 85 products in 0.13 s warm, detail 0.2-0.9 s, thumbnails resolve.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-12 11:34:59 +01:00

282 lines
9.0 KiB
PHP
Executable File

<?php
defined('TYPO3') || die();
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
// Configure view template paths for the OG Image backend module
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['vitec']['view'] = [
'templateRootPaths' => ['10' => 'EXT:vitec/Resources/Private/Templates/'],
'layoutRootPaths' => ['10' => 'EXT:vitec/Resources/Private/Layouts/'],
'partialRootPaths' => ['10' => 'EXT:vitec/Resources/Private/Partials/'],
];
// Register VITEC Backend Layout data provider — 21 BE layouts, one per pages.layout (0..20)
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['BackendLayoutDataProvider']['vitec']
= \Evomedien\Vitec\View\BackendLayoutDataProvider::class;
// Auto-sync pages.backend_layout <- pages.layout via DataHandler hook
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['vitec-sync-backend-layout']
= \Evomedien\Vitec\Hook\SyncBackendLayoutHook::class;
// XClass BackendLayoutView so the page module always reflects pages.layout
// without the editor having to set backend_layout manually.
// Content-block images as processed, responsive WebP instead of the raw
// upload (Lighthouse 2026-11-10: 4-13 MB hero originals). The headless
// content-blocks package instantiates its serializer via makeInstance, so
// XCLASS is the supported hook. See Classes/Headless/ProcessedFileReferenceToArray.
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][\Netzbewegung\NbHeadlessContentBlocks\DataProcessing\ToArray\FileReferenceToArray::class] = [
'className' => \Evomedien\Vitec\Headless\ProcessedFileReferenceToArray::class,
];
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][\TYPO3\CMS\Backend\View\BackendLayoutView::class] = [
'className' => \Evomedien\Vitec\View\VitecBackendLayoutView::class,
];
// Register custom VITEC CKEditor RTE preset
$GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['vitec'] = 'EXT:vitec/Configuration/RTE/Vitec.yaml';
// FormEngine fieldWizard: "Structured Data generieren" button below the
// product structureddata field (see TCA + StructuredDataGeneratorWizard).
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry'][1750000000] = [
'nodeName' => 'structuredDataGenerator',
'priority' => 40,
'class' => \Evomedien\Vitec\Backend\FormEngine\StructuredDataGeneratorWizard::class,
];
(static function () {
// Register plugins
ExtensionUtility::configurePlugin(
'Vitec',
'Productlist',
[
\Evomedien\Vitec\Controller\ProductController::class => 'list'
],
[
\Evomedien\Vitec\Controller\ProductController::class => 'list'
]
);
ExtensionUtility::configurePlugin(
'Vitec',
'Simplecard',
[
\Evomedien\Vitec\Controller\SimplecardController::class => 'list'
],
[
\Evomedien\Vitec\Controller\SimplecardController::class => 'list'
]
);
ExtensionUtility::configurePlugin(
'Vitec',
'Productshow',
[
\Evomedien\Vitec\Controller\ProductController::class => 'show'
],
[
\Evomedien\Vitec\Controller\ProductController::class => 'show'
]
);
ExtensionUtility::configurePlugin(
'Vitec',
'Usecaseshow',
[
\Evomedien\Vitec\Controller\UsecaseController::class => 'show'
],
[
\Evomedien\Vitec\Controller\UsecaseController::class => 'show'
]
);
ExtensionUtility::configurePlugin(
'Vitec',
'Marketshow',
[
\Evomedien\Vitec\Controller\MarketController::class => 'show'
],
[
\Evomedien\Vitec\Controller\MarketController::class => 'show'
]
);
ExtensionUtility::configurePlugin(
'Vitec',
'Marketlist',
[
\Evomedien\Vitec\Controller\MarketController::class => 'list'
],
[
\Evomedien\Vitec\Controller\MarketController::class => 'list'
]
);
ExtensionUtility::configurePlugin(
'Vitec',
'Solutionlist',
[
\Evomedien\Vitec\Controller\SolutionController::class => 'list'
],
[
\Evomedien\Vitec\Controller\SolutionController::class => 'list'
]
);
ExtensionUtility::configurePlugin(
'Vitec',
'Solutionshow',
[
\Evomedien\Vitec\Controller\SolutionController::class => 'show'
],
[
\Evomedien\Vitec\Controller\SolutionController::class => 'show'
]
);
ExtensionUtility::configurePlugin(
'Vitec',
'Usecaselist',
[
\Evomedien\Vitec\Controller\UsecaseController::class => 'list'
],
[
\Evomedien\Vitec\Controller\UsecaseController::class => 'list'
]
);
ExtensionUtility::configurePlugin(
'Vitec',
'Downloadcard',
[
\Evomedien\Vitec\Controller\DownloadController::class => 'list, show'
],
[
\Evomedien\Vitec\Controller\DownloadController::class => 'list, show'
]
);
ExtensionUtility::configurePlugin(
'Vitec',
'Downloadcardcollection',
[
\Evomedien\Vitec\Controller\DownloadController::class => 'downloadcardcollection'
],
[
\Evomedien\Vitec\Controller\DownloadController::class => 'downloadcardcollection'
]
);
ExtensionUtility::configurePlugin(
'Vitec',
'Datasheets',
[
\Evomedien\Vitec\Controller\DownloadController::class => 'datasheets'
],
[
\Evomedien\Vitec\Controller\DownloadController::class => 'datasheets'
]
);
ExtensionUtility::configurePlugin(
'Vitec',
'Eventlist',
[
\Evomedien\Vitec\Controller\EventController::class => 'list'
],
[
\Evomedien\Vitec\Controller\EventController::class => 'list'
]
);
ExtensionUtility::configurePlugin(
'Vitec',
'Locationlist',
[
\Evomedien\Vitec\Controller\LocationController::class => 'list'
],
[
\Evomedien\Vitec\Controller\LocationController::class => 'list'
]
);
ExtensionUtility::configurePlugin(
'Vitec',
'Customerlogos',
[
\Evomedien\Vitec\Controller\CustomerController::class => 'list'
],
[
\Evomedien\Vitec\Controller\CustomerController::class => 'list'
]
);
ExtensionUtility::configurePlugin(
'Vitec',
'Modelcard',
[
\Evomedien\Vitec\Controller\ModelcardController::class => 'list'
],
[
\Evomedien\Vitec\Controller\ModelcardController::class => 'list'
]
);
ExtensionUtility::configurePlugin(
'Vitec',
'Contactform',
[
\Evomedien\Vitec\Controller\FormController::class => 'list'
],
[
\Evomedien\Vitec\Controller\FormController::class => 'list'
]
);
ExtensionUtility::configurePlugin(
'Vitec',
'Demoform',
[
\Evomedien\Vitec\Controller\FormController::class => 'list'
],
[
\Evomedien\Vitec\Controller\FormController::class => 'list'
]
);
ExtensionUtility::configurePlugin(
'Vitec',
'Helpdeskform',
[
\Evomedien\Vitec\Controller\FormController::class => 'list'
],
[
\Evomedien\Vitec\Controller\FormController::class => 'list'
]
);
})();
// The JSON search endpoint (SearchJsonRenderer) uses plain `q` and `page` GET
// parameters. Without this exclusion TYPO3 demands a cHash for them and answers
// with an error page; the no_cache condition in the Vitecset TypoScript makes
// sure search responses are rendered fresh instead of sticking in the page cache.
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'q';
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'page';
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'filter';
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'market';
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'category';
// Product content audit (/products/product-check): ?check=<product uid>
// switches the vitec_productcheck element to the detail payload.
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'check';
// SSR auto-purge: editors' changes evict the matching pages from the SSR
// node's full-page cache (queued per request, one call per save/import).
// Active only while the SSR flag is ON and vitec.ssr.autoPurge is enabled.
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['vitec_ssrpurge']
= \Evomedien\Vitec\Hooks\DataHandlerSsrPurge::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass']['vitec_ssrpurge']
= \Evomedien\Vitec\Hooks\DataHandlerSsrPurge::class;