VITEC headless: ContentElementResolver, Product fields (videofile, showdatapath)

- New Classes/Service/ContentElementResolver.php: parses TYPO3 typolink
  (t3://record?identifier=tt_content&uid=N, t3://page?uid=P#N, plain numeric)
  to a normalised tt_content envelope ({id,type,colPos,sorting,appearance,
  data}), recursively resolving any nested VITEC list-plugin children.
- ProductListJsonRenderer / ProductShowJsonRenderer: contentelement and
  contentelementcta now emit the resolved object instead of the raw
  typolink string (breaking change at those two keys).
- Product model: new field videofile (FAL, single video upload in tab
  Images and Videos, mp4/webm/ogv/mov/m4v); new bool field showdatapath
  (toggle at end of General tab, controls the "Datapath is now Vitec"
  graphic in the frontend). ext_tables.sql, TCA, model property +
  getter/setter, and both renderers updated accordingly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
o-rasche
2026-06-05 10:34:49 +02:00
parent dba154e572
commit 409afc2433
34 changed files with 461 additions and 9 deletions

0
packages/vitec/Configuration/FlexForms/Container.xml Executable file → Normal file
View File

0
packages/vitec/Configuration/Icons.php Executable file → Normal file
View File

0
packages/vitec/Configuration/TCA/Overrides/pages.php Executable file → Normal file
View File

View File

View File

@@ -23,9 +23,9 @@ return [
],
],
'types' => [
'1' => ['showitem' => 'title, subtitle, slug, teaser, description, applications, highlights, contentelement, contentelementcta, downloads,
'1' => ['showitem' => 'title, subtitle, slug, teaser, description, applications, highlights, contentelement, contentelementcta, downloads, showdatapath,
--div--;SEO, seotitle, urltitle, seometa, keywords, structureddata,
--div--;Images and Videos, productimage, ogimage, video,
--div--;Images and Videos, productimage, ogimage, video, videofile,
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:categories, categories,
--div--;Visibility, hideonapp, hideonwebsite, hideondatasheets, hideonproducts, shortcut, shortcutpid,
--div--;Misc, legacy, supportproduct, subproduct, relatedprodukt,
@@ -496,6 +496,52 @@ return [
],
],
'videofile' => [
'exclude' => true,
'label' => 'Video File (Upload or Local)',
'config' => [
'type' => 'inline',
'foreign_table' => 'sys_file_reference',
'foreign_field' => 'uid_foreign',
'foreign_sortby' => 'sorting_foreign',
'foreign_table_field' => 'tablenames',
'foreign_match_fields' => [
'fieldname' => 'videofile',
],
'appearance' => [
'collapseAll' => true,
'levelLinksPosition' => 'top',
'showSynchronizationLink' => true,
'showPossibleLocalizationRecords' => true,
'showAllLocalizationLink' => true,
],
'behaviour' => [
'allowLanguageSynchronization' => true,
],
'filter' => [
[
'userFunc' => \TYPO3\CMS\Core\Resource\Filter\FileExtensionFilter::class . '->filterInlineChildren',
'parameters' => [
'allowedFileExtensions' => 'mp4,webm,ogv,mov,m4v',
],
],
],
'maxitems' => 1,
'minitems' => 0,
],
],
'showdatapath' => [
'exclude' => true,
'label' => "Show 'Datapath is now Vitec' graphic",
'description' => "Toggle the 'Datapath is now Vitec' graphic on this product in the frontend.",
'config' => [
'type' => 'check',
'renderType' => 'checkboxToggle',
'default' => 0,
],
],
'contentelement' => [
'exclude' => true,
'label' => 'Select Content Element for Key Features Section',
@@ -538,4 +584,4 @@ return [
/* ----------------------------------------------------- */
],
];
];