mirror of
https://github.com/werkraum-media/thuecat.git
synced 2024-12-04 19:16:13 +01:00
Do not break during import on openingHours presence
The objects might have an openingHours property. This would break as our internal name would match during symfony serialization. We now use the expected property name.
This commit is contained in:
parent
4f81120aee
commit
d7c7d8eaee
1 changed files with 3 additions and 3 deletions
|
@ -51,7 +51,7 @@ class Place extends Base
|
||||||
/**
|
/**
|
||||||
* @var OpeningHour[]
|
* @var OpeningHour[]
|
||||||
*/
|
*/
|
||||||
protected $openingHours = [];
|
protected $openingHoursSpecifications = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var OpeningHour[]
|
* @var OpeningHour[]
|
||||||
|
@ -160,7 +160,7 @@ class Place extends Base
|
||||||
{
|
{
|
||||||
return GeneralUtility::makeInstance(DateBasedFilter::class)
|
return GeneralUtility::makeInstance(DateBasedFilter::class)
|
||||||
->filterOutPreviousDates(
|
->filterOutPreviousDates(
|
||||||
$this->openingHours,
|
$this->openingHoursSpecifications,
|
||||||
function (OpeningHour $hour): ?\DateTimeImmutable {
|
function (OpeningHour $hour): ?\DateTimeImmutable {
|
||||||
return $hour->getValidThrough();
|
return $hour->getValidThrough();
|
||||||
}
|
}
|
||||||
|
@ -210,7 +210,7 @@ class Place extends Base
|
||||||
*/
|
*/
|
||||||
public function addOpeningHoursSpecification(OpeningHour $openingHour): void
|
public function addOpeningHoursSpecification(OpeningHour $openingHour): void
|
||||||
{
|
{
|
||||||
$this->openingHours[] = $openingHour;
|
$this->openingHoursSpecifications[] = $openingHour;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue