Resolves a cascade of TYPO3 v14 breaking changes that left every VITEC plugin's JSON output silently empty: 1. `list_type` column dropped — all renderer page-discovery queries now filter by `CType = 'vitec_X'`. 2. `#[AsAllowedCallable]` attribute added to every public render() — without it v14 throws AllowedCallableException, which headless silently filters via its "Oops, an error occurred!" guard. 3. `$GLOBALS['TSFE']->id` is null inside JSON cObj context — page id now read from the `frontend.page.information` request attribute (TSFE fallback kept for legacy entry points). 4. page.tsconfig wizard items migrated to `CType = vitec_X` directly (legacy `CType=list, list_type=...` no longer exists in v14). 5. ContainerChildrenProcessor + ContentElementResolver dispatch the PLUGIN_RENDERERS map by CType (primary) with list_type fallback. Beyond the bug fix this commit also contains: - Datasheets renderer rewritten to "products with newest datasheet" semantics (filtered via Download.hideondatasheets). - New vitec/card content block — multi-purpose card with backend preview and layout/background/aspect/alignment/border/shadow options. - New vitec_container CType (b13 single-column container, FlexForm cssClass propagated into the JSON envelope). - ContentElementResolver service for contentelement/contentelementcta link resolution; ContainerChildrenProcessor for nested plugin resolution inside b13 containers. - Vitecset setup.typoscript: ContentElement import moved to top so lib.contentElement is defined before VITEC's tt_content blocks. - Cleanup: 98 .bak.<timestamp> debugging backups removed; *.bak.* and /public/_assets_install/ added to .gitignore. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
381 lines
14 KiB
PHP
381 lines
14 KiB
PHP
<?php
|
|
return [
|
|
'ctrl' => [
|
|
'title' => 'VITEC Download',
|
|
'label' => 'title',
|
|
'tstamp' => 'tstamp',
|
|
'crdate' => 'crdate',
|
|
'cruser_id' => 'cruser_id',
|
|
'versioningWS' => true,
|
|
'languageField' => 'sys_language_uid',
|
|
'transOrigPointerField' => 'l10n_parent',
|
|
'transOrigDiffSourceField' => 'l10n_diffsource',
|
|
'delete' => 'deleted',
|
|
'enablecolumns' => [
|
|
'disabled' => 'hidden',
|
|
'starttime' => 'starttime',
|
|
'endtime' => 'endtime',
|
|
],
|
|
'searchFields' => 'title,slug,teaser,description,sort1,sort2,sort3,icon,filepath,fileprefix',
|
|
'iconfile' => 'EXT:vitec/Resources/Public/Icons/tx_vitec_domain_model_download.gif'
|
|
],
|
|
'types' => [
|
|
'1' => ['showitem' => 'hidden, title, slug, keywords, teaser, description,
|
|
--div--;File, useolddl, file, fileprefix, categories,
|
|
--div--;Visibility, hideonapp, hideonwebsite, hideondatasheets, hideonproducts,
|
|
--div--;Currently not in use,icon, filepath, private_download, onlyondatasheets, sort1, sort2, sort3,
|
|
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'],
|
|
],
|
|
'columns' => [
|
|
'sys_language_uid' => [
|
|
'exclude' => true,
|
|
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
|
'config' => [
|
|
'type' => 'select',
|
|
'renderType' => 'selectSingle',
|
|
'special' => 'languages',
|
|
'items' => [
|
|
[
|
|
'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages',
|
|
-1,
|
|
'flags-multiple'
|
|
]
|
|
],
|
|
'default' => 0,
|
|
],
|
|
],
|
|
'l10n_parent' => [
|
|
'displayCond' => 'FIELD:sys_language_uid:>:0',
|
|
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
|
'config' => [
|
|
'type' => 'select',
|
|
'renderType' => 'selectSingle',
|
|
'default' => 0,
|
|
'items' => [
|
|
['', 0],
|
|
],
|
|
'foreign_table' => 'tx_vitec_domain_model_download',
|
|
'foreign_table_where' => 'AND {#tx_vitec_domain_model_download}.{#pid}=###CURRENT_PID### AND {#tx_vitec_domain_model_download}.{#sys_language_uid} IN (-1,0)',
|
|
],
|
|
],
|
|
'l10n_diffsource' => [
|
|
'config' => [
|
|
'type' => 'passthrough',
|
|
],
|
|
],
|
|
'hidden' => [
|
|
'exclude' => true,
|
|
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.visible',
|
|
'config' => [
|
|
'type' => 'check',
|
|
'renderType' => 'checkboxToggle',
|
|
'items' => [
|
|
[
|
|
0 => '',
|
|
1 => '',
|
|
'invertStateDisplay' => true
|
|
]
|
|
],
|
|
],
|
|
],
|
|
'starttime' => [
|
|
'exclude' => true,
|
|
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
|
|
'config' => [
|
|
'type' => 'input',
|
|
'renderType' => 'inputDateTime',
|
|
'eval' => 'datetime,int',
|
|
'default' => 0,
|
|
'behaviour' => [
|
|
'allowLanguageSynchronization' => true
|
|
]
|
|
],
|
|
],
|
|
'endtime' => [
|
|
'exclude' => true,
|
|
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
|
|
'config' => [
|
|
'type' => 'input',
|
|
'renderType' => 'inputDateTime',
|
|
'eval' => 'datetime,int',
|
|
'default' => 0,
|
|
'range' => [
|
|
'upper' => mktime(0, 0, 0, 1, 1, 2038)
|
|
],
|
|
'behaviour' => [
|
|
'allowLanguageSynchronization' => true
|
|
]
|
|
],
|
|
],
|
|
'categories' => [
|
|
'config' => [
|
|
'type' => 'category'
|
|
]
|
|
],
|
|
'title' => [
|
|
'exclude' => true,
|
|
'label' => 'Title',
|
|
'description' => 'Title of the Download - this will be shown in search results',
|
|
'config' => [
|
|
'type' => 'input',
|
|
'size' => 30,
|
|
'eval' => 'trim',
|
|
'default' => ''
|
|
],
|
|
],
|
|
'teaser' => [
|
|
'exclude' => true,
|
|
'label' => 'Teaser Text for Download Cards',
|
|
'config' => [
|
|
'type' => 'input',
|
|
'size' => 30,
|
|
'eval' => 'trim',
|
|
'default' => ''
|
|
],
|
|
],
|
|
'slug' => [
|
|
'exclude' => true,
|
|
'label' => 'Slug',
|
|
'config' => [
|
|
'type' => 'slug',
|
|
'generatorOptions' => [
|
|
'fields' => ['title'],
|
|
'fieldSeparator' => '/',
|
|
'prefixParentPageSlug' => true,
|
|
'replacements' => [
|
|
'/' => '',
|
|
],
|
|
],
|
|
'fallbackCharacter' => '-',
|
|
'eval' => 'unique',
|
|
],
|
|
],
|
|
'keywords' => [
|
|
'exclude' => true,
|
|
'label' => 'Keywords for internal search engine',
|
|
'config' => [
|
|
'type' => 'input',
|
|
'size' => 30,
|
|
'eval' => 'trim',
|
|
'default' => ''
|
|
],
|
|
],
|
|
'description' => [
|
|
'exclude' => true,
|
|
'label' => 'Description',
|
|
'config' => [
|
|
'type' => 'text',
|
|
'enableRichtext' => true,
|
|
'richtextConfiguration' => 'default',
|
|
'fieldControl' => [
|
|
'fullScreenRichtext' => [
|
|
'disabled' => false,
|
|
],
|
|
],
|
|
'cols' => 40,
|
|
'rows' => 15,
|
|
'eval' => 'trim',
|
|
],
|
|
|
|
],
|
|
'file' => [
|
|
'exclude' => true,
|
|
'label' => 'Manual File Upload - if "Use manual file upload" is checked',
|
|
'config' => [
|
|
'type' => 'file',
|
|
'appearance' => [
|
|
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:media.addFileReference'
|
|
],
|
|
'foreign_types' => [
|
|
'0' => [
|
|
'showitem' => '
|
|
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
|
--palette--;;filePalette'
|
|
],
|
|
\TYPO3\CMS\Core\Resource\FileType::TEXT->value => [
|
|
'showitem' => '
|
|
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
|
--palette--;;filePalette'
|
|
],
|
|
\TYPO3\CMS\Core\Resource\FileType::IMAGE->value => [
|
|
'showitem' => '
|
|
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
|
--palette--;;filePalette'
|
|
],
|
|
\TYPO3\CMS\Core\Resource\FileType::AUDIO->value => [
|
|
'showitem' => '
|
|
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
|
--palette--;;filePalette'
|
|
],
|
|
\TYPO3\CMS\Core\Resource\FileType::VIDEO->value => [
|
|
'showitem' => '
|
|
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
|
--palette--;;filePalette'
|
|
],
|
|
\TYPO3\CMS\Core\Resource\FileType::APPLICATION->value => [
|
|
'showitem' => '
|
|
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
|
--palette--;;filePalette'
|
|
]
|
|
],
|
|
'foreign_match_fields' => [
|
|
'fieldname' => 'file',
|
|
'tablenames' => 'tx_vitec_domain_model_download',
|
|
],
|
|
'maxitems' => 1
|
|
],
|
|
],
|
|
'sort1' => [
|
|
'exclude' => true,
|
|
'label' => 'LLL:EXT:vitec/Resources/Private/Language/locallang_db.xlf:tx_vitec_domain_model_download.sort1',
|
|
'config' => [
|
|
'type' => 'input',
|
|
'size' => 30,
|
|
'eval' => 'trim',
|
|
'default' => ''
|
|
],
|
|
],
|
|
'sort2' => [
|
|
'exclude' => true,
|
|
'label' => 'LLL:EXT:vitec/Resources/Private/Language/locallang_db.xlf:tx_vitec_domain_model_download.sort2',
|
|
'config' => [
|
|
'type' => 'input',
|
|
'size' => 30,
|
|
'eval' => 'trim',
|
|
'default' => ''
|
|
],
|
|
],
|
|
'sort3' => [
|
|
'exclude' => true,
|
|
'label' => 'LLL:EXT:vitec/Resources/Private/Language/locallang_db.xlf:tx_vitec_domain_model_download.sort3',
|
|
'config' => [
|
|
'type' => 'input',
|
|
'size' => 30,
|
|
'eval' => 'trim',
|
|
'default' => ''
|
|
],
|
|
],
|
|
'private_download' => [
|
|
'exclude' => true,
|
|
'label' => 'LLL:EXT:vitec/Resources/Private/Language/locallang_db.xlf:tx_vitec_domain_model_download.private_download',
|
|
'config' => [
|
|
'type' => 'check',
|
|
'renderType' => 'checkboxToggle',
|
|
'items' => [
|
|
[
|
|
0 => '',
|
|
1 => '',
|
|
]
|
|
],
|
|
'default' => 0,
|
|
]
|
|
],
|
|
'hideonapp' => [
|
|
'exclude' => true,
|
|
'label' => 'Do not show this Download in the App',
|
|
'config' => [
|
|
'type' => 'check',
|
|
'renderType' => 'checkboxToggle',
|
|
'items' => [
|
|
[
|
|
0 => '',
|
|
1 => '',
|
|
]
|
|
],
|
|
'default' => 0,
|
|
]
|
|
],
|
|
'hideonwebsite' => [
|
|
'exclude' => true,
|
|
'label' => 'Do not show this Download on the Website',
|
|
'config' => [
|
|
'type' => 'check',
|
|
'renderType' => 'checkboxToggle',
|
|
'items' => [
|
|
[
|
|
0 => '',
|
|
1 => '',
|
|
]
|
|
],
|
|
'default' => 0,
|
|
]
|
|
],
|
|
'hideondatasheets' => [
|
|
'exclude' => true,
|
|
'label' => 'Do not show this Download on the Datasheets-Page',
|
|
'config' => [
|
|
'type' => 'check',
|
|
'renderType' => 'checkboxToggle',
|
|
'items' => [
|
|
[
|
|
0 => '',
|
|
1 => '',
|
|
]
|
|
],
|
|
'default' => 0,
|
|
]
|
|
],
|
|
'hideonproducts' => [
|
|
'exclude' => true,
|
|
'label' => 'Do not show this Download on a Products-Page',
|
|
'config' => [
|
|
'type' => 'check',
|
|
'renderType' => 'checkboxToggle',
|
|
'items' => [
|
|
[
|
|
0 => '',
|
|
1 => '',
|
|
]
|
|
],
|
|
'default' => 0,
|
|
]
|
|
],
|
|
'icon' => [
|
|
'exclude' => true,
|
|
'label' => 'LLL:EXT:vitec/Resources/Private/Language/locallang_db.xlf:tx_vitec_domain_model_download.icon',
|
|
'config' => [
|
|
'type' => 'input',
|
|
'size' => 30,
|
|
'eval' => 'trim',
|
|
'default' => ''
|
|
],
|
|
],
|
|
'filepath' => [
|
|
'exclude' => true,
|
|
'label' => 'LLL:EXT:vitec/Resources/Private/Language/locallang_db.xlf:tx_vitec_domain_model_download.filepath',
|
|
'config' => [
|
|
'type' => 'input',
|
|
'size' => 30,
|
|
'eval' => 'trim',
|
|
'default' => ''
|
|
],
|
|
],
|
|
'fileprefix' => [
|
|
'exclude' => true,
|
|
'label' => 'Fileprefix (1st part of filename)',
|
|
'description' => 'This is the first part of the filename.',
|
|
'config' => [
|
|
'type' => 'input',
|
|
'size' => 30,
|
|
'eval' => 'trim',
|
|
'default' => ''
|
|
],
|
|
],
|
|
'useolddl' => [
|
|
'exclude' => true,
|
|
'label' => 'Use manual file upload',
|
|
'config' => [
|
|
'type' => 'check',
|
|
'renderType' => 'checkboxToggle',
|
|
'items' => [
|
|
[
|
|
0 => '',
|
|
1 => '',
|
|
]
|
|
],
|
|
'default' => 0,
|
|
]
|
|
],
|
|
],
|
|
];
|