Enable multiple concepts for static search params

This commit is contained in:
Björn Fromme
2018-08-28 14:20:49 +02:00
parent 95aef2b189
commit 1ee720b7a7
3 changed files with 8 additions and 4 deletions
@@ -2,6 +2,8 @@
namespace EP\EpProducts\Domain\Model; namespace EP\EpProducts\Domain\Model;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/*************************************************************** /***************************************************************
* *
* Copyright notice * Copyright notice
@@ -199,7 +201,8 @@ class FilterSettings implements \JsonSerializable
$filterSettings->setRegionUids([$searchParams['region']]); $filterSettings->setRegionUids([$searchParams['region']]);
} }
if (!empty($searchParams['concept'])) { if (!empty($searchParams['concept'])) {
$filterSettings->setConceptUids([$searchParams['concept']]); $conceptUids = GeneralUtility::trimExplode(',', $searchParams['concept']);
$filterSettings->setConceptUids($conceptUids);
} }
if (!empty($searchParams['hotel'])) { if (!empty($searchParams['hotel'])) {
$filterSettings->setHotelUid($searchParams['hotel']); $filterSettings->setHotelUid($searchParams['hotel']);
@@ -149,11 +149,12 @@ return [
'label' => 'Konzept', 'label' => 'Konzept',
'config' => [ 'config' => [
'type' => 'select', 'type' => 'select',
'renderType' => 'selectSingle', 'renderType' => 'selectSingleBox',
'foreign_table' => 'tx_epproducts_domain_model_concept', 'foreign_table' => 'tx_epproducts_domain_model_concept',
'foreign_table_where' => 'AND 1=1 ORDER BY name', 'foreign_table_where' => 'AND 1=1 ORDER BY name',
'minItems' => 0, 'minItems' => 0,
'maxitems' => 1, 'maxitems' => 10,
'size' => 5,
'items' => [ 'items' => [
[ 'Keine Auswahl', 0 ], [ 'Keine Auswahl', 0 ],
] ]
+1 -1
View File
@@ -1034,7 +1034,7 @@ CREATE TABLE tx_epproducts_domain_model_staticsearchparams (
date_to date DEFAULT '0000-00-00', date_to date DEFAULT '0000-00-00',
bus tinyint(1) unsigned DEFAULT '0' NOT NULL, bus tinyint(1) unsigned DEFAULT '0' NOT NULL,
product int(11) unsigned DEFAULT '0', product int(11) unsigned DEFAULT '0',
concept int(11) unsigned DEFAULT '0', concept varchar(255) DEFAULT '' NOT NULL,
country int(11) unsigned DEFAULT '0', country int(11) unsigned DEFAULT '0',
region int(11) unsigned DEFAULT '0', region int(11) unsigned DEFAULT '0',
hotel int(11) unsigned DEFAULT '0', hotel int(11) unsigned DEFAULT '0',