Refactor configurator defaults config, add more defaults
This commit is contained in:
+39
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
defined('TYPO3_MODE') or die();
|
||||
|
||||
call_user_func(function() {
|
||||
|
||||
$budgetItems = $paxItems = $periodItems = [
|
||||
['keine Auswahl', 0]
|
||||
];
|
||||
|
||||
if (isset($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['ep_events'])) {
|
||||
$extensionConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['ep_events']);
|
||||
|
||||
$budgetItemsConfig = explode(';', $extensionConfiguration['configuratorBudgetOptions']);
|
||||
foreach ($budgetItemsConfig as $item)
|
||||
{
|
||||
list ($value, $label) = explode(':', $item);
|
||||
$budgetItems[] = [$label, $value];
|
||||
}
|
||||
$GLOBALS['TCA']['tx_epevents_domain_model_offer']['columns']['configurator_budget']['config']['items'] = $budgetItems;
|
||||
|
||||
$paxItemsConfig = explode(';', $extensionConfiguration['configuratorPaxOptions']);
|
||||
foreach ($paxItemsConfig as $item)
|
||||
{
|
||||
list ($value, $label) = explode(':', $item);
|
||||
$paxItems[] = [$label, $value];
|
||||
}
|
||||
$GLOBALS['TCA']['tx_epevents_domain_model_offer']['columns']['configurator_pax']['config']['items'] = $paxItems;
|
||||
|
||||
$periodItemsConfig = explode(';', $extensionConfiguration['configuratorPeriodOptions']);
|
||||
foreach ($periodItemsConfig as $item)
|
||||
{
|
||||
list ($value, $label) = explode(':', $item);
|
||||
$periodItems[] = [$label, $value];
|
||||
}
|
||||
$GLOBALS['TCA']['tx_epevents_domain_model_offer']['columns']['configurator_period']['config']['items'] = $periodItems;
|
||||
}
|
||||
|
||||
});
|
||||
@@ -27,8 +27,9 @@ return [
|
||||
'interface' => [
|
||||
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, type, name, name_internal,
|
||||
groupname, price, headline, header, arrival, schedule, services, guidelines, image_teaser,
|
||||
image_teaser_mobile, image_header, booking_form, configurator_type, contact, hotel, location, activities,
|
||||
detail_page, url, url_rendered',
|
||||
image_teaser_mobile, image_header, booking_form, configurator_type, configurator_budget,
|
||||
configurator_pax, configurator_period, contact, hotel, location, activities, detail_page, url,
|
||||
url_rendered',
|
||||
],
|
||||
'types' => [
|
||||
'1' => [
|
||||
@@ -71,7 +72,7 @@ return [
|
||||
],
|
||||
],
|
||||
'palettes' => [
|
||||
'general' => ['showitem' => 'type, configurator_type, detail_page'],
|
||||
'general' => ['showitem' => 'type, configurator_type, configurator_pax, configurator_budget, configurator_period, detail_page'],
|
||||
'general_ext' => ['showitem' => 'type, configurator_type, price'],
|
||||
'naming' => ['showitem' => 'name, name_internal'],
|
||||
'url' => ['showitem' => 'url, url_rendered'],
|
||||
@@ -385,7 +386,45 @@ return [
|
||||
'size' => 1,
|
||||
'minitems' => 1,
|
||||
'maxitems' => 1,
|
||||
'eval' => ''
|
||||
],
|
||||
],
|
||||
'configurator_budget' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Konfigurator Budget',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [],
|
||||
'default' => 1,
|
||||
'size' => 1,
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
],
|
||||
],
|
||||
'configurator_pax' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Teilnehmerzahl',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [],
|
||||
'default' => 1,
|
||||
'size' => 1,
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
],
|
||||
],
|
||||
'configurator_period' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Reisezeitraum',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [],
|
||||
'default' => 1,
|
||||
'size' => 1,
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
],
|
||||
],
|
||||
'contact' => [
|
||||
|
||||
Reference in New Issue
Block a user