|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace Lc\CaracoleBundle\Resolver; |
|
|
namespace Lc\CaracoleBundle\Resolver; |
|
|
|
|
|
|
|
|
use App\Entity\Section\Section; |
|
|
|
|
|
use Lc\CaracoleBundle\Definition\SectionSettingDefinition; |
|
|
use Lc\CaracoleBundle\Definition\SectionSettingDefinition; |
|
|
use Lc\CaracoleBundle\Model\Section\OpeningInterface; |
|
|
use Lc\CaracoleBundle\Model\Section\OpeningInterface; |
|
|
use Lc\CaracoleBundle\Model\Section\SectionInterface; |
|
|
use Lc\CaracoleBundle\Model\Section\SectionInterface; |
|
|
use Lc\CaracoleBundle\Model\Section\SectionModel; |
|
|
|
|
|
use Lc\CaracoleBundle\Repository\Order\OrderShopStore; |
|
|
use Lc\CaracoleBundle\Repository\Order\OrderShopStore; |
|
|
use Lc\CaracoleBundle\Repository\Section\OpeningStore; |
|
|
use Lc\CaracoleBundle\Repository\Section\OpeningStore; |
|
|
use Lc\CaracoleBundle\Solver\Section\OpeningSolver; |
|
|
use Lc\CaracoleBundle\Solver\Section\OpeningSolver; |
|
|
|
|
|
|
|
|
return ''; |
|
|
return ''; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function isOpenSaleOnlyComplementaryOrders(Section $section = null, UserInterface $user = null) |
|
|
|
|
|
|
|
|
public function isOpenSaleOnlyComplementaryOrders(SectionInterface $section = null, UserInterface $user = null) |
|
|
{ |
|
|
{ |
|
|
if (is_null($section)) { |
|
|
if (is_null($section)) { |
|
|
$section = $this->sectionResolver->getCurrent(); |
|
|
$section = $this->sectionResolver->getCurrent(); |
|
|
|
|
|
|
|
|
&& count($orderShopsUser) > 0; |
|
|
&& count($orderShopsUser) > 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function getMessageOpeningNextSale(SectionInterface $section): ?string |
|
|
|
|
|
{ |
|
|
|
|
|
$openingTextClosed = $this->settingSolver->getSettingValue( |
|
|
|
|
|
$section, |
|
|
|
|
|
SectionSettingDefinition::SETTING_OPENING_TEXT_CLOSED |
|
|
|
|
|
); |
|
|
|
|
|
if ($openingTextClosed && strlen($openingTextClosed) > 0) { |
|
|
|
|
|
return $openingTextClosed ; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$dateOpeningNextSale = $this->getFormatedDateOpeningNextSale($section); |
|
|
|
|
|
if ($dateOpeningNextSale && strlen($dateOpeningNextSale) > 0) { |
|
|
|
|
|
return 'Réouverture aux commandes le <u>'.$dateOpeningNextSale.'</u>' ; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public function getMessages(): array |
|
|
public function getMessages(): array |
|
|
{ |
|
|
{ |
|
|
return $this->messages; |
|
|
return $this->messages; |