Add pax to static search params

This commit is contained in:
Björn Fromme
2018-10-31 17:54:03 +01:00
parent 034306f032
commit 598d500f78
3 changed files with 15 additions and 3 deletions
@@ -224,7 +224,9 @@ class FilterSettings implements \JsonSerializable
$dateTo = new \DateTime($searchParams['date_to']); $dateTo = new \DateTime($searchParams['date_to']);
$filterSettings->setDateTo($dateTo); $filterSettings->setDateTo($dateTo);
} }
if (!empty($searchParams['pax']) && (int) $searchParams['pax'] > 0) {
$filterSettings->setPax($searchParams['pax']);
}
return $filterSettings; return $filterSettings;
} }
@@ -23,12 +23,12 @@ return [
], ],
'interface' => [ 'interface' => [
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, name, path_segment, 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, name, path_segment,
country, region, concept, hotel, product, date_from, date_to, hotel_types, bus', country, region, concept, hotel, product, date_from, date_to, hotel_types, bus, pax',
], ],
'types' => [ 'types' => [
'1' => [ '1' => [
'showitem' => 'name, path_segment, country, region, concept, hotel, product, date_from, 'showitem' => 'name, path_segment, country, region, concept, hotel, product, date_from,
date_to, hotel_types, bus', date_to, hotel_types, bus, pax',
], ],
], ],
'palettes' => [], 'palettes' => [],
@@ -250,5 +250,14 @@ return [
'renderType' => 'inputDateTime', 'renderType' => 'inputDateTime',
] ]
], ],
'pax' => [
'exclude' => 0,
'label' => 'Personen',
'config' => [
'type' => 'input',
'size' => 2,
'eval' => 'int',
]
]
], ],
]; ];
@@ -1055,6 +1055,7 @@ CREATE TABLE tx_epproducts_domain_model_staticsearchparams (
region int(11) unsigned DEFAULT '0', region int(11) unsigned DEFAULT '0',
hotel int(11) unsigned DEFAULT '0', hotel int(11) unsigned DEFAULT '0',
hotel_types varchar(255) DEFAULT '' NOT NULL, hotel_types varchar(255) DEFAULT '' NOT NULL,
pax int(11) unsigned DEFAULT '0',
tstamp int(11) unsigned DEFAULT '0' NOT NULL, tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL, crdate int(11) unsigned DEFAULT '0' NOT NULL,