|
|
|
|
|
|
|
|
use Lc\CaracoleBundle\Repository\Section\SectionStore; |
|
|
use Lc\CaracoleBundle\Repository\Section\SectionStore; |
|
|
use Lc\SovBundle\Resolver\UrlResolver; |
|
|
use Lc\SovBundle\Resolver\UrlResolver; |
|
|
use Symfony\Component\HttpFoundation\RequestStack; |
|
|
use Symfony\Component\HttpFoundation\RequestStack; |
|
|
|
|
|
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
|
|
use Symfony\Component\Security\Core\Security; |
|
|
use Symfony\Component\Security\Core\Security; |
|
|
|
|
|
|
|
|
class SectionResolver |
|
|
class SectionResolver |
|
|
|
|
|
|
|
|
$sectionCurrent = $sectionStore |
|
|
$sectionCurrent = $sectionStore |
|
|
->setMerchant($merchantCurrent) |
|
|
->setMerchant($merchantCurrent) |
|
|
->getOneBySlug($requestAttributesArray['section']); |
|
|
->getOneBySlug($requestAttributesArray['section']); |
|
|
|
|
|
if($sectionCurrent===null){ |
|
|
|
|
|
throw new NotFoundHttpException('Aucun espace n\'a été trouvé'); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if ($sectionCurrent) { |
|
|
if ($sectionCurrent) { |