Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

OpeningEventSubscriber.php 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace Lc\CaracoleBundle\EventSubscriber;
  3. use Doctrine\ORM\EntityManagerInterface;
  4. use Lc\CaracoleBundle\Definition\MerchantSettingDefinitionInterface;
  5. use Lc\CaracoleBundle\Factory\Setting\MerchantSettingFactory;
  6. use Lc\CaracoleBundle\Factory\Setting\SectionSettingFactory;
  7. use Lc\CaracoleBundle\Model\Section\SectionInterface;
  8. use Lc\CaracoleBundle\Definition\SectionSettingDefinitionInterface;
  9. use Lc\CaracoleBundle\Repository\Merchant\MerchantRepository;
  10. use Lc\CaracoleBundle\Repository\Section\OpeningRepositoryQuery;
  11. use Lc\CaracoleBundle\Repository\Section\SectionRepository;
  12. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  13. use Symfony\Component\HttpKernel\KernelEvents;
  14. class OpeningEventSubscriber implements EventSubscriberInterface
  15. {
  16. protected $entityManager;
  17. protected $openingRepositoryQuery;
  18. public function __construct(
  19. EntityManagerInterface $entityManager,
  20. OpeningRepositoryQuery $openingRepositoryQuery
  21. ) {
  22. $this->entityManager = $entityManager;
  23. $this->openingRepositoryQuery = $openingRepositoryQuery;
  24. }
  25. public static function getSubscribedEvents()
  26. {
  27. return [
  28. KernelEvents::CONTROLLER => ['initOpenings']
  29. ];
  30. }
  31. public function initOpenings()
  32. {
  33. }
  34. }