Ver código fonte

OpeningStore : section optionnal

packProduct
Guillaume 3 anos atrás
pai
commit
b7486797e1
2 arquivos alterados com 1 adições e 32 exclusões
  1. +0
    -30
      EventSubscriber/OpeningEventSubscriber.php
  2. +1
    -2
      Repository/Section/OpeningStore.php

+ 0
- 30
EventSubscriber/OpeningEventSubscriber.php Ver arquivo

@@ -1,30 +0,0 @@
<?php

namespace Lc\CaracoleBundle\EventSubscriber;

use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\KernelEvents;

class OpeningEventSubscriber implements EventSubscriberInterface
{
protected EntityManagerInterface $entityManager;

public function __construct(
EntityManagerInterface $entityManager
) {
$this->entityManager = $entityManager;
}

public static function getSubscribedEvents()
{
return [
KernelEvents::CONTROLLER => ['initOpenings']
];
}

public function initOpenings()
{
}

}

+ 1
- 2
Repository/Section/OpeningStore.php Ver arquivo

@@ -25,7 +25,7 @@ class OpeningStore extends AbstractStore

public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface
{
$query->filterBySection($this->section);
$this->addFilterBySectionOptionnal($query);
return $query;
}

@@ -33,5 +33,4 @@ class OpeningStore extends AbstractStore
{
return $query;
}

}

Carregando…
Cancelar
Salvar