Przeglądaj źródła

Corrections Reminder

packProduct
Guillaume 2 lat temu
rodzic
commit
6750ee8b5b
2 zmienionych plików z 3 dodań i 11 usunięć
  1. +1
    -4
      Controller/Reminder/ReminderAdminController.php
  2. +2
    -7
      Repository/Reminder/ReminderStore.php

+ 1
- 4
Controller/Reminder/ReminderAdminController.php Wyświetl plik

@@ -2,12 +2,9 @@

namespace Lc\CaracoleBundle\Controller\Reminder;

use App\Entity\Reminder\Reminder;
use Lc\CaracoleBundle\Controller\AdminControllerTrait;
use Lc\CaracoleBundle\Factory\Reminder\ReminderFactory;
use Lc\CaracoleBundle\Resolver\MerchantResolver;
use Lc\CaracoleBundle\Resolver\SectionResolver;
use Lc\SovBundle\Container\Reminder\ReminderContainer;
use Lc\SovBundle\Controller\Reminder\ReminderAdminController as SovReminderAdminController;

class ReminderAdminController extends SovReminderAdminController
@@ -16,7 +13,7 @@ class ReminderAdminController extends SovReminderAdminController

public function createEntity(string $crudAction = null, string $crudControllerFqcn = null, int $entityId = null)
{
return $this->get(ReminderContainer::class)
return $this->getReminderContainer()
->getFactory()
->setMerchant($this->get(MerchantResolver::class)->getCurrent())
->setSection($this->get(SectionResolver::class)->getCurrent())

+ 2
- 7
Repository/Reminder/ReminderStore.php Wyświetl plik

@@ -16,13 +16,8 @@ class ReminderStore extends SovReminderStore

public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface
{
if ($this->merchant) {
$query->filterByMerchant($this->merchant);
}

if ($this->section) {
$query->filterBySection($this->section);
}
$this->addFilterByMerchantOptionnal($query);
$this->addFilterBySectionOptionnal($query);

return parent::filtersDefault($query);
}

Ładowanie…
Anuluj
Zapisz