getIsPublic()) {
return '[Public] ' . $pointSale->getTitle();
} else {
return '[Privée] ' . $pointSale->getTitle();
}
}
public function getSummary(PointSaleInterface $pointSale): string
{
$html = '';
if ($pointSale->getTitle()) {
$html .= $pointSale->getTitle() . '
';
}
if ($pointSale->getAddress()) {
$html .= $pointSale->getAddress()->getAddress() . '
';
}
if ($pointSale->getAddress()->getZip() || $pointSale->getAddress()->getCity()) {
$html .= $pointSale->getAddress()->getZip() . ' ' . $pointSale->getAddress()->getCity() . '
';
}
return $html;
}
public function getOrderAmountMin(PointSaleInterface $pointSale, SectionInterface $section)
{
foreach($pointSale->getPointSaleSections() as $pointSaleSection) {
if($pointSaleSection->getSection()->getId() == $section->getId()) {
$orderAmountMin = $pointSaleSection->getOrderAmountMin();
if(!is_null($orderAmountMin)) {
return $orderAmountMin;
}
}
}
return $pointSale->getOrderAmountMin();
}
}