Merge branch 'develop'
This commit is contained in:
@@ -85,7 +85,8 @@ class CityController extends ActionController
|
|||||||
{
|
{
|
||||||
$regionUid = $this->settings['regionUid'];
|
$regionUid = $this->settings['regionUid'];
|
||||||
$season = $this->settings['season'];
|
$season = $this->settings['season'];
|
||||||
$cities = $this->cityRepository->getTeasersByRegionAndSeason($regionUid, $season);
|
$citiesPid = $this->settings['citiesPid'];
|
||||||
|
$cities = $this->cityRepository->getTeasersByRegionAndSeason($regionUid, $season, $citiesPid);
|
||||||
$data = $this->configurationManager->getContentObject()->data;
|
$data = $this->configurationManager->getContentObject()->data;
|
||||||
$this->view->assign('data', $data);
|
$this->view->assign('data', $data);
|
||||||
$this->view->assign('teasers', $cities);
|
$this->view->assign('teasers', $cities);
|
||||||
|
|||||||
@@ -85,7 +85,8 @@ class RegionController extends ActionController
|
|||||||
{
|
{
|
||||||
$countryUid = $this->settings['countryUid'];
|
$countryUid = $this->settings['countryUid'];
|
||||||
$season = $this->settings['season'];
|
$season = $this->settings['season'];
|
||||||
$regions = $this->regionRepository->getTeasersByCountryAndSeason($countryUid, $season);
|
$regionsPid = $this->settings['regionsStoragePid'];
|
||||||
|
$regions = $this->regionRepository->getTeasersByCountryAndSeason($countryUid, $season, $regionsPid);
|
||||||
$data = $this->configurationManager->getContentObject()->data;
|
$data = $this->configurationManager->getContentObject()->data;
|
||||||
$this->view->assign('data', $data);
|
$this->view->assign('data', $data);
|
||||||
$this->view->assign('teasers', $regions);
|
$this->view->assign('teasers', $regions);
|
||||||
|
|||||||
@@ -31,14 +31,7 @@ use EP\EpProducts\Domain\Model\AbstractDestination;
|
|||||||
|
|
||||||
class CityRepository extends AbstractRepository
|
class CityRepository extends AbstractRepository
|
||||||
{
|
{
|
||||||
|
public function getTeasersByRegionAndSeason(int $regionUid, string $season = 'w', int $storagePid = 0)
|
||||||
/**
|
|
||||||
* @param int $regionUid
|
|
||||||
* @param string $season
|
|
||||||
*
|
|
||||||
* @return \TYPO3\CMS\Extbase\Persistence\QueryResultInterface
|
|
||||||
*/
|
|
||||||
public function getTeasersByRegionAndSeason($regionUid, $season = 'w')
|
|
||||||
{
|
{
|
||||||
if ($season === null) {
|
if ($season === null) {
|
||||||
$season = AbstractDestination::SEASON_WINTER;
|
$season = AbstractDestination::SEASON_WINTER;
|
||||||
@@ -49,6 +42,10 @@ class CityRepository extends AbstractRepository
|
|||||||
$query->equals('season', $season),
|
$query->equals('season', $season),
|
||||||
$query->equals('excludeFromTeasergroups', 0)
|
$query->equals('excludeFromTeasergroups', 0)
|
||||||
];
|
];
|
||||||
|
if (0 < $storagePid) {
|
||||||
|
$constraints[] = $query->equals('pid', $storagePid);
|
||||||
|
}
|
||||||
|
|
||||||
return $query
|
return $query
|
||||||
->matching($query->logicalAnd($constraints))
|
->matching($query->logicalAnd($constraints))
|
||||||
->execute()
|
->execute()
|
||||||
|
|||||||
@@ -31,13 +31,7 @@ use EP\EpProducts\Domain\Model\AbstractDestination;
|
|||||||
|
|
||||||
class RegionRepository extends AbstractRepository
|
class RegionRepository extends AbstractRepository
|
||||||
{
|
{
|
||||||
|
public function getTeasersByCountryAndSeason(int $countryUid, string $season = 'w', int $storagePid = 0)
|
||||||
/**
|
|
||||||
* @param int $countryUid
|
|
||||||
* @param string $season
|
|
||||||
* @return \TYPO3\CMS\Extbase\Persistence\QueryResultInterface
|
|
||||||
*/
|
|
||||||
public function getTeasersByCountryAndSeason($countryUid, $season = 'w')
|
|
||||||
{
|
{
|
||||||
if ($season === null) {
|
if ($season === null) {
|
||||||
$season = AbstractDestination::SEASON_WINTER;
|
$season = AbstractDestination::SEASON_WINTER;
|
||||||
@@ -48,6 +42,11 @@ class RegionRepository extends AbstractRepository
|
|||||||
$query->equals('season', $season),
|
$query->equals('season', $season),
|
||||||
$query->equals('excludeFromTeasergroups', 0)
|
$query->equals('excludeFromTeasergroups', 0)
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if (0 < $storagePid) {
|
||||||
|
$constraints[] = $query->equals('pid', $storagePid);
|
||||||
|
}
|
||||||
|
|
||||||
return $query
|
return $query
|
||||||
->matching($query->logicalAnd($constraints))
|
->matching($query->logicalAnd($constraints))
|
||||||
->execute()
|
->execute()
|
||||||
|
|||||||
@@ -1,48 +1,58 @@
|
|||||||
|
# customsubcategory=100=Storage
|
||||||
|
# customsubcategory=110=Pages
|
||||||
|
# customsubcategory=120=Search/Filtering
|
||||||
|
# customsubcategory=130=Email
|
||||||
|
# customsubcategory=140=Misc
|
||||||
|
|
||||||
plugin.tx_epproducts {
|
plugin.tx_epproducts {
|
||||||
settings {
|
settings {
|
||||||
# cat=plugin.tx_epproducts//a; type=string; label=Products storage PID
|
# cat=epproducts/100/100; type=string; label=Products storage PID
|
||||||
productsStoragePid =
|
productsStoragePid =
|
||||||
# cat=plugin.tx_epproducts//a; type=string; label=Hotels storage PID
|
# cat=epproducts/100/110; type=string; label=Hotels storage PID
|
||||||
hotelsStoragePid =
|
hotelsStoragePid =
|
||||||
# cat=plugin.tx_epproducts//a; type=string; label=Concepts storage PID
|
# cat=epproducts/100/120; type=string; label=Concepts storage PID
|
||||||
conceptsStoragePid =
|
conceptsStoragePid =
|
||||||
# cat=plugin.tx_epproducts//a; type=string; label=Facts storage PID
|
# cat=epproducts/100/130; type=string; label=Facts storage PID
|
||||||
factsStoragePid =
|
factsStoragePid =
|
||||||
# cat=plugin.tx_epproducts//a; type=string; label=Faqs storage PID
|
# cat=epproducts/100/140; type=string; label=Faqs storage PID
|
||||||
faqsStoragePid =
|
faqsStoragePid =
|
||||||
# cat=plugin.tx_epproducts//a; type=string; label=Destinations storage PID
|
# cat=epproducts/100/150; type=string; label=Destinations storage PID
|
||||||
destinationsStoragePid =
|
destinationsStoragePid =
|
||||||
# cat=plugin.tx_epproducts//a; type=string; label=Teammember storage PID
|
# cat=epproducts/100/160; type=string; label=Regions storage PID
|
||||||
|
regionsStoragePid =
|
||||||
|
# cat=epproducts/100/160; type=string; label=Cities storage PID
|
||||||
|
citiesStoragePid =
|
||||||
|
# cat=epproducts/100/170; type=string; label=Teammember storage PID
|
||||||
teammemberStoragePid =
|
teammemberStoragePid =
|
||||||
# cat=plugin.tx_epproducts//a; type=string; label=Officetip storage PID
|
# cat=epproducts/100/180; type=string; label=Officetip storage PID
|
||||||
officetipStoragePid =
|
officetipStoragePid =
|
||||||
# cat=plugin.tx_epproducts//a; type=string; label=Snow report storage PID
|
# cat=epproducts/100/190; type=string; label=Snow report storage PID
|
||||||
snowReportStoragePid =
|
snowReportStoragePid =
|
||||||
# cat=plugin.tx_epproducts//a; type=string; label=Default search page UID
|
# cat=epproducts/110/100; type=string; label=Default search page UID
|
||||||
defaultSearchPageUid =
|
defaultSearchPageUid =
|
||||||
# cat=plugin.tx_epproducts//a; type=string; label=Default product detail page UID
|
# cat=epproducts/110/110; type=string; label=Default product detail page UID
|
||||||
defaultDetailPageUid =
|
defaultDetailPageUid =
|
||||||
# cat=plugin.tx_epproducts//a; type=string; label=Exclude products with concept UIDs from search result (CSV)
|
# cat=epproducts/110/120; type=string; label=Page UID with reseller export plugin
|
||||||
excludedConceptUids =
|
|
||||||
# cat=plugin.tx_epproducts//a; type=string; label=Exclude regions with these UIDs from filter options (CSV)
|
|
||||||
excludedRegionUids =
|
|
||||||
# cat=plugin.tx_epproducts//a; type=string; label=Force concept UID in all search related parts (CSV)
|
|
||||||
forcedConceptUids =
|
|
||||||
# cat=plugin.tx_epproducts//a; type=string; label=Don't show availability info for products with these concept UIDs
|
|
||||||
noInfoConceptUids =
|
|
||||||
# cat=plugin.tx_epproducts//a; type=string; label=Room types for pricetables (CSV)
|
|
||||||
priceTableRoomTypes = 1,2,3,4,5,6,7,8,9,10
|
|
||||||
# cat=plugin.tx_epproducts//a; type=string; label=Ignore following IPs in searchlog
|
|
||||||
searchLogIgnoreIps =
|
|
||||||
# cat=plugin.tx_epproducts//a; type=string; label=Page UID with reseller export plugin
|
|
||||||
resellerExportPageUid =
|
resellerExportPageUid =
|
||||||
# cat=plugin.tx_epproducts//a; type=string; label=Email recipient for groups price inquiries
|
# cat=epproducts/120/100; type=string; label=Exclude products with concept UIDs from search result (CSV)
|
||||||
|
excludedConceptUids =
|
||||||
|
# cat=epproducts/120/110; type=string; label=Exclude regions with these UIDs from filter options (CSV)
|
||||||
|
excludedRegionUids =
|
||||||
|
# cat=epproducts/120/120; type=string; label=Force concept UID in all search related parts (CSV)
|
||||||
|
forcedConceptUids =
|
||||||
|
# cat=epproducts/120/130; type=string; label=Don't show availability info for products with these concept UIDs
|
||||||
|
noInfoConceptUids =
|
||||||
|
# cat=epproducts/130/110; type=string; label=Email recipient for groups price inquiries
|
||||||
groupsPriceToEmail = [email protected]
|
groupsPriceToEmail = [email protected]
|
||||||
# cat=plugin.tx_epproducts//a; type=string; label=Email recipient for groups price inquiries
|
# cat=epproducts/130/120; type=string; label=Email recipient for groups price inquiries
|
||||||
groupsPriceToName = EP Reisen
|
groupsPriceToName = EP Reisen
|
||||||
|
# cat=epproducts/140/100; type=string; label=Room types for pricetables (CSV)
|
||||||
|
priceTableRoomTypes = 1,2,3,4,5,6,7,8,9,10
|
||||||
|
# cat=epproducts/140/110; type=string; label=Ignore following IPs in searchlog
|
||||||
|
searchLogIgnoreIps =
|
||||||
}
|
}
|
||||||
persistence {
|
persistence {
|
||||||
# cat=plugin.tx_epproducts//a; type=string; label=Default storage PID
|
# cat=epproducts/100/100; type=string; label=Default storage PID
|
||||||
storagePid =
|
storagePid =
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ plugin.tx_epproducts {
|
|||||||
settings {
|
settings {
|
||||||
productsPid = {$plugin.tx_epproducts.settings.productsStoragePid}
|
productsPid = {$plugin.tx_epproducts.settings.productsStoragePid}
|
||||||
destinationsStoragePid = {$plugin.tx_epproducts.settings.destinationsStoragePid}
|
destinationsStoragePid = {$plugin.tx_epproducts.settings.destinationsStoragePid}
|
||||||
|
regionsStoragePid = {$plugin.tx_epproducts.settings.regionsStoragePid}
|
||||||
|
citiesStoragePid = {$plugin.tx_epproducts.settings.citiesStoragePid}
|
||||||
snowReportStoragePid = {$plugin.tx_epproducts.settings.snowReportStoragePid}
|
snowReportStoragePid = {$plugin.tx_epproducts.settings.snowReportStoragePid}
|
||||||
defaultSearchPageUid = {$plugin.tx_epproducts.settings.defaultSearchPageUid}
|
defaultSearchPageUid = {$plugin.tx_epproducts.settings.defaultSearchPageUid}
|
||||||
defaultDetailPageUid = {$plugin.tx_epproducts.settings.defaultDetailPageUid}
|
defaultDetailPageUid = {$plugin.tx_epproducts.settings.defaultDetailPageUid}
|
||||||
|
|||||||
Reference in New Issue
Block a user