Procházet zdrojové kódy

Filtre section & merchant

feature/ticket
Fab před 3 roky
rodič
revize
b071cfd41b
1 změnil soubory, kde provedl 4 přidání a 3 odebrání
  1. +4
    -3
      Controller/Admin/AbstractCrudController.php

+ 4
- 3
Controller/Admin/AbstractCrudController.php Zobrazit soubor

@@ -16,6 +16,7 @@ use EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto;
use EasyCorp\Bundle\EasyAdminBundle\Dto\SearchDto;
use Lc\SovBundle\Doctrine\EntityManager;
use Lc\SovBundle\Doctrine\Extension\TreeInterface;
use Lc\SovBundle\Translation\TranslatorAdmin;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Session\SessionInterface;

@@ -26,9 +27,9 @@ abstract class AbstractCrudController extends SovAbstractCrudController
protected $merchantResolver;
protected $sectionResolver;

public function __construct(SessionInterface $session, RequestStack $request, EntityManager $em, SectionResolver $sectionResolver, MerchantResolver $merchantResolver)
public function __construct(SessionInterface $session, RequestStack $request, EntityManager $em, TranslatorAdmin $translatorAdmin, SectionResolver $sectionResolver, MerchantResolver $merchantResolver)
{
parent::__construct($session, $request, $em);
parent::__construct($session, $request, $em, $translatorAdmin);
$this->merchantResolver = $merchantResolver;
$this->sectionResolver = $sectionResolver;

@@ -57,7 +58,7 @@ abstract class AbstractCrudController extends SovAbstractCrudController
$queryBuilder->andWhere('entity.section = :section');
$queryBuilder->setParameter('section', $this->merchantResolver->getCurrent());
}
return $queryBuilder;
}


Načítá se…
Zrušit
Uložit