Selaa lähdekoodia

OpeningStore : section optionnal

packProduct
Guillaume 2 vuotta sitten
vanhempi
commit
b7486797e1
2 muutettua tiedostoa jossa 1 lisäystä ja 32 poistoa
  1. +0
    -30
      EventSubscriber/OpeningEventSubscriber.php
  2. +1
    -2
      Repository/Section/OpeningStore.php

+ 0
- 30
EventSubscriber/OpeningEventSubscriber.php Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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;
}

}

Loading…
Peruuta
Tallenna