|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// isHolidays |
|
|
// isHolidays |
|
|
public function isClosingPeriod(SectionInterface $section = null) |
|
|
|
|
|
|
|
|
public function isClosingPeriod(SectionInterface $section = null, \DateTime $date = null) |
|
|
{ |
|
|
{ |
|
|
if (is_null($section)) { |
|
|
if (is_null($section)) { |
|
|
$section = $this->sectionResolver->getCurrent(); |
|
|
$section = $this->sectionResolver->getCurrent(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$date = new \DateTime(); |
|
|
|
|
|
|
|
|
if(is_null($date)) { |
|
|
|
|
|
$date = new \DateTime(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
$orderClosedStart = $this->settingSolver->getSettingValue( |
|
|
$orderClosedStart = $this->settingSolver->getSettingValue( |
|
|
$section, |
|
|
$section, |
|
|
SectionSettingDefinition::SETTING_ORDER_CLOSED_START |
|
|
SectionSettingDefinition::SETTING_ORDER_CLOSED_START |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
$orderClosedEnd = $this->settingSolver->getSettingValue( |
|
|
$orderClosedEnd = $this->settingSolver->getSettingValue( |
|
|
$section, |
|
|
$section, |
|
|
SectionSettingDefinition::SETTING_ORDER_CLOSED_END |
|
|
SectionSettingDefinition::SETTING_ORDER_CLOSED_END |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$date = new \DateTime(); |
|
|
$date = new \DateTime(); |
|
|
|
|
|
if($this->isClosingPeriod($section)) { |
|
|
|
|
|
$date = $this->settingSolver->getSettingValue( |
|
|
|
|
|
$section, |
|
|
|
|
|
SectionSettingDefinition::SETTING_ORDER_CLOSED_END |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
$openingArray = $this->openingStore |
|
|
$openingArray = $this->openingStore |
|
|
->setSection($section) |
|
|
->setSection($section) |
|
|
->get(); |
|
|
->get(); |