121 lines
4.6 KiB
PHP
121 lines
4.6 KiB
PHP
<?php
|
|
|
|
defined('TYPO3') or die();
|
|
|
|
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
|
|
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
|
|
|
|
// Register the Simple Card plugin
|
|
$simplecardPluginSignature = \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
|
'Vitec',
|
|
'Simplecard',
|
|
'Simple Card'
|
|
);
|
|
|
|
// Register the "Single Success Story" plugin
|
|
$usecaseShowPluginSignature = \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
|
'Vitec',
|
|
'Usecaseshow',
|
|
'Single Success Story'
|
|
);
|
|
|
|
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$usecaseShowPluginSignature] = 'pi_flexform';
|
|
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
|
|
$usecaseShowPluginSignature,
|
|
'FILE:EXT:vitec/Configuration/FlexForms/Usecase.xml'
|
|
);
|
|
|
|
// Register the "Show Single Market" plugin
|
|
$marketShowPluginSignature = \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
|
'Vitec',
|
|
'Marketshow',
|
|
'Show Single Market'
|
|
);
|
|
|
|
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$marketShowPluginSignature] = 'pi_flexform';
|
|
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
|
|
$marketShowPluginSignature,
|
|
'FILE:EXT:vitec/Configuration/FlexForms/Market.xml'
|
|
);
|
|
|
|
// Register the "Show Single Solution" plugin
|
|
$solutionShowPluginSignature = \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
|
'Vitec',
|
|
'Solutionshow',
|
|
'Show Single Solution'
|
|
);
|
|
|
|
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$solutionShowPluginSignature] = 'pi_flexform';
|
|
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
|
|
$solutionShowPluginSignature,
|
|
'FILE:EXT:vitec/Configuration/FlexForms/Solution.xml'
|
|
);
|
|
|
|
// Register the "Show Products by Category" plugin
|
|
$productListPluginSignature = \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
|
'Vitec',
|
|
'Productlist',
|
|
'Show Products by Category'
|
|
);
|
|
|
|
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$productListPluginSignature] = 'pi_flexform';
|
|
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
|
|
$productListPluginSignature,
|
|
'FILE:EXT:vitec/Configuration/FlexForms/Productlist.xml'
|
|
);
|
|
|
|
// Register the "Show Single Product" plugin
|
|
$productShowPluginSignature = \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
|
'Vitec',
|
|
'Productshow',
|
|
'Show Single Product'
|
|
);
|
|
|
|
|
|
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$productShowPluginSignature] = 'pi_flexform';
|
|
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
|
|
$productShowPluginSignature,
|
|
'FILE:EXT:vitec/Configuration/FlexForms/Productshow.xml'
|
|
);
|
|
|
|
// Register the "Shows List of all Success Stories" plugin
|
|
$usecaseListPluginSignature = \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
|
'Vitec',
|
|
'Usecaselist',
|
|
'Shows List of all Success Stories'
|
|
);
|
|
|
|
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$usecaseListPluginSignature] = 'pi_flexform';
|
|
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
|
|
$usecaseListPluginSignature,
|
|
'FILE:EXT:vitec/Configuration/FlexForms/Usecaselist.xml'
|
|
);
|
|
|
|
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$simplecardPluginSignature] = 'pi_flexform';
|
|
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
|
|
$simplecardPluginSignature,
|
|
'FILE:EXT:vitec/Configuration/FlexForms/Simplecard.xml'
|
|
);
|
|
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['vitec_datasheets'] = 'recursive,select_key,pages';
|
|
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['vitec_datasheets'] = 'pi_flexform';
|
|
ExtensionManagementUtility::addPiFlexFormValue(
|
|
'vitec_datasheets',
|
|
'FILE:EXT:vitec/Configuration/FlexForms/Datasheets.xml'
|
|
);
|
|
|
|
// Change frame_class to allow multiple selections
|
|
$GLOBALS['TCA']['tt_content']['columns']['frame_class']['config']['renderType'] = 'selectCheckBox';
|
|
$GLOBALS['TCA']['tt_content']['columns']['frame_class']['config']['maxitems'] = 999;
|
|
|
|
// Add custom frame_class options for Vitec
|
|
$GLOBALS['TCA']['tt_content']['columns']['frame_class']['config']['items'] = array_merge(
|
|
$GLOBALS['TCA']['tt_content']['columns']['frame_class']['config']['items'],
|
|
[
|
|
['label' => 'Vitec: Full Width', 'value' => 'vitec-full-width'],
|
|
['label' => 'Vitec: Centered Container', 'value' => 'vitec-centered'],
|
|
['label' => 'Vitec: Card Style', 'value' => 'vitec-card'],
|
|
['label' => 'Vitec: Dark Background', 'value' => 'vitec-dark'],
|
|
['label' => 'Vitec: Highlight Box', 'value' => 'vitec-highlight'],
|
|
]
|
|
);
|