Merge branch 'release/2020.03-02'
This commit is contained in:
Generated
+9
-9
@@ -6004,29 +6004,29 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "pimple/pimple",
|
"name": "pimple/pimple",
|
||||||
"version": "v3.2.3",
|
"version": "v3.3.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/silexphp/Pimple.git",
|
"url": "https://github.com/silexphp/Pimple.git",
|
||||||
"reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32"
|
"reference": "e55d12f9d6a0e7f9c85992b73df1267f46279930"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/silexphp/Pimple/zipball/9e403941ef9d65d20cba7d54e29fe906db42cf32",
|
"url": "https://api.github.com/repos/silexphp/Pimple/zipball/e55d12f9d6a0e7f9c85992b73df1267f46279930",
|
||||||
"reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32",
|
"reference": "e55d12f9d6a0e7f9c85992b73df1267f46279930",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.0",
|
"php": "^7.2.5",
|
||||||
"psr/container": "^1.0"
|
"psr/container": "^1.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"symfony/phpunit-bridge": "^3.2"
|
"symfony/phpunit-bridge": "^3.4|^4.4|^5.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "3.2.x-dev"
|
"dev-master": "3.3.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -6045,12 +6045,12 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Pimple, a simple Dependency Injection Container",
|
"description": "Pimple, a simple Dependency Injection Container",
|
||||||
"homepage": "http://pimple.sensiolabs.org",
|
"homepage": "https://pimple.symfony.com",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"container",
|
"container",
|
||||||
"dependency injection"
|
"dependency injection"
|
||||||
],
|
],
|
||||||
"time": "2018-01-21T07:42:36+00:00"
|
"time": "2020-03-03T09:12:48+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
|
|||||||
@@ -248,6 +248,31 @@ class ProductRepository extends AbstractRepository
|
|||||||
return $query->execute()->fetchAll();
|
return $query->execute()->fetchAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns uids of date records that are selected to be non bookable
|
||||||
|
* via backend
|
||||||
|
*
|
||||||
|
* @param Product $product
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getNonBookableDateUids(Product $product)
|
||||||
|
{
|
||||||
|
$qb = $this->getDbConnection()->createQueryBuilder();
|
||||||
|
|
||||||
|
$result = $qb
|
||||||
|
->select('uid_foreign as uid')
|
||||||
|
->from('tx_epproducts_product_date_mm')
|
||||||
|
->where('uid_local = :product')
|
||||||
|
->setParameter('product', $product->getUid())
|
||||||
|
->execute()
|
||||||
|
->fetchAll()
|
||||||
|
;
|
||||||
|
|
||||||
|
return array_map(function ($row) {
|
||||||
|
return $row['uid'];
|
||||||
|
}, $result);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Product $product
|
* @param Product $product
|
||||||
* @param Hotel $hotel
|
* @param Hotel $hotel
|
||||||
|
|||||||
@@ -144,12 +144,22 @@ class DateService implements SingletonInterface
|
|||||||
if ($filterSettings === null) {
|
if ($filterSettings === null) {
|
||||||
$filterSettings = $this->filterService->getDefaultFilterSettings();
|
$filterSettings = $this->filterService->getDefaultFilterSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$nonBookableDateUids = $this->productRepository->getNonBookableDateUids($product);
|
||||||
|
|
||||||
|
$dateTableData = $this->productRepository->getAvailableDates(
|
||||||
|
$product,
|
||||||
|
$hotel,
|
||||||
|
$filterSettings
|
||||||
|
);
|
||||||
|
|
||||||
return $this->preprocessDateTable([
|
return $this->preprocessDateTable([
|
||||||
'dateTableData' => $this->productRepository->getAvailableDates($product, $hotel, $filterSettings),
|
'dateTableData' => $dateTableData,
|
||||||
'template' => $template,
|
'template' => $template,
|
||||||
'paCode' => $paCode,
|
'paCode' => $paCode,
|
||||||
'isDayTrip' => $product->isDaytrip(),
|
'isDayTrip' => $product->isDaytrip(),
|
||||||
'isHideBookingButton' => $product->getHideBookingButton(),
|
'isHideBookingButton' => $product->getHideBookingButton(),
|
||||||
|
'nonBookableDateUids' => $nonBookableDateUids,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -317,10 +327,11 @@ class DateService implements SingletonInterface
|
|||||||
public function preprocessDateTable(array $options)
|
public function preprocessDateTable(array $options)
|
||||||
{
|
{
|
||||||
$resolver = new OptionsResolver();
|
$resolver = new OptionsResolver();
|
||||||
$resolver->setDefined(['paCode', 'isDayTrip', 'isHideBookingButton']);
|
$resolver->setDefined(['paCode', 'isDayTrip', 'isHideBookingButton', 'nonBookableDateUids']);
|
||||||
$resolver->setRequired(['dateTableData', 'template']);
|
$resolver->setRequired(['dateTableData', 'template']);
|
||||||
$resolver->setDefault('isDayTrip', false);
|
$resolver->setDefault('isDayTrip', false);
|
||||||
$resolver->setDefault('isHideBookingButton', false);
|
$resolver->setDefault('isHideBookingButton', false);
|
||||||
|
$resolver->setDefault('nonBookableDateUids', []);
|
||||||
$resolvedOptions = $resolver->resolve($options);
|
$resolvedOptions = $resolver->resolve($options);
|
||||||
|
|
||||||
$dateTable = [];
|
$dateTable = [];
|
||||||
@@ -329,10 +340,12 @@ class DateService implements SingletonInterface
|
|||||||
$template = $resolvedOptions['template'];
|
$template = $resolvedOptions['template'];
|
||||||
$paCode = $resolvedOptions['paCode'];
|
$paCode = $resolvedOptions['paCode'];
|
||||||
$isDayTrip = $resolvedOptions['isDayTrip'];
|
$isDayTrip = $resolvedOptions['isDayTrip'];
|
||||||
$isHideBookingButton = $resolvedOptions['isHideBookingButton'];
|
$nonBookableDateUids = $resolvedOptions['nonBookableDateUids'];
|
||||||
|
|
||||||
foreach ($dateTableData as $row)
|
foreach ($dateTableData as $row)
|
||||||
{
|
{
|
||||||
|
$isHideBookingButton = $resolvedOptions['isHideBookingButton'] || in_array($row['dateUid'], $nonBookableDateUids, false);
|
||||||
|
|
||||||
$dateStart = new \DateTime($row['dateStart']);
|
$dateStart = new \DateTime($row['dateStart']);
|
||||||
$dateEnd = new \DateTime($row['dateEnd']);
|
$dateEnd = new \DateTime($row['dateEnd']);
|
||||||
$bookingUrl = BookingUrlUtility::generateUrl([
|
$bookingUrl = BookingUrlUtility::generateUrl([
|
||||||
|
|||||||
+14
-2
@@ -29,7 +29,7 @@ return [
|
|||||||
rating_average, rating_votes_count, teaser_images, header_images, images, concept, country, region, city,
|
rating_average, rating_votes_count, teaser_images, header_images, images, concept, country, region, city,
|
||||||
journey, facts, officetip, hotels, calendar_hotel, faqs,header_title,header_subtitle, alt_product, alt_label,
|
journey, facts, officetip, hotels, calendar_hotel, faqs,header_title,header_subtitle, alt_product, alt_label,
|
||||||
video, banner, additional_regions, badge, daytrip, testimonials, external_link, path_segment,
|
video, banner, additional_regions, badge, daytrip, testimonials, external_link, path_segment,
|
||||||
hide_booking_button',
|
hide_booking_button,non_bookable_dates',
|
||||||
],
|
],
|
||||||
'types' => [
|
'types' => [
|
||||||
'1' => [
|
'1' => [
|
||||||
@@ -40,7 +40,8 @@ return [
|
|||||||
--div--;Verknüpfungen, journey, --palette--;;concept, hotels, facts, faqs, officetip,
|
--div--;Verknüpfungen, journey, --palette--;;concept, hotels, facts, faqs, officetip,
|
||||||
additional_regions, badge,
|
additional_regions, badge,
|
||||||
--div--;Bilder/Dateien, teaser_images, header_images, images, reseller_images, banner, video,
|
--div--;Bilder/Dateien, teaser_images, header_images, images, reseller_images, banner, video,
|
||||||
--div--;Bewertung, --palette--;;rating, testimonials',
|
--div--;Bewertung, --palette--;;rating, testimonials,
|
||||||
|
--div--;Buchbarkeit, non_bookable_dates',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'palettes' => [
|
'palettes' => [
|
||||||
@@ -831,5 +832,16 @@ return [
|
|||||||
'eval' => 'uniqueInSite',
|
'eval' => 'uniqueInSite',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
'non_bookable_dates' => [
|
||||||
|
'exclude' => 0,
|
||||||
|
'label' => 'Nicht buchbare Termine',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'select',
|
||||||
|
'renderType' => 'selectSingleBox',
|
||||||
|
'foreign_table' => 'tx_epproducts_domain_model_date',
|
||||||
|
'foreign_table_where' => 'AND tx_epproducts_domain_model_date.product=###THIS_UID### ORDER BY tx_epproducts_domain_model_date.date_start',
|
||||||
|
'MM' => 'tx_epproducts_product_date_mm',
|
||||||
|
]
|
||||||
|
]
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ CREATE TABLE tx_epproducts_domain_model_product
|
|||||||
video varchar(255) DEFAULT '' NOT NULL,
|
video varchar(255) DEFAULT '' NOT NULL,
|
||||||
banner int(11) unsigned NOT NULL default '0',
|
banner int(11) unsigned NOT NULL default '0',
|
||||||
badge int(11) unsigned NOT NULL default '0',
|
badge int(11) unsigned NOT NULL default '0',
|
||||||
|
non_bookable_dates int(11) unsigned NOT NULL 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,
|
||||||
cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
|
cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
|
||||||
@@ -1329,6 +1329,20 @@ CREATE TABLE tx_epproducts_product_region_mm
|
|||||||
KEY uid_foreign (uid_foreign)
|
KEY uid_foreign (uid_foreign)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#
|
||||||
|
# Table structure for table 'tx_epproducts_product_date_mm'
|
||||||
|
#
|
||||||
|
CREATE TABLE tx_epproducts_product_date_mm
|
||||||
|
(
|
||||||
|
uid_local int(11) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
sorting int(11) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
sorting_foreign int(11) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
|
||||||
|
KEY uid_local (uid_local),
|
||||||
|
KEY uid_foreign (uid_foreign)
|
||||||
|
);
|
||||||
|
|
||||||
#
|
#
|
||||||
# Table structure for table 'tx_epproducts_hotel_teammember_mm'
|
# Table structure for table 'tx_epproducts_hotel_teammember_mm'
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user