ソースを参照

OpeningStore : section optionnal

packProduct
Guillaume 2年前
コミット
b7486797e1
2個のファイルの変更1行の追加32行の削除
  1. +0
    -30
      EventSubscriber/OpeningEventSubscriber.php
  2. +1
    -2
      Repository/Section/OpeningStore.php

+ 0
- 30
EventSubscriber/OpeningEventSubscriber.php ファイルの表示

@@ -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 ファイルの表示

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

}

読み込み中…
キャンセル
保存