Selaa lähdekoodia

Filtre section & merchant

feature/ticket
Fab 3 vuotta sitten
vanhempi
commit
b071cfd41b
1 muutettua tiedostoa jossa 4 lisäystä ja 3 poistoa
  1. +4
    -3
      Controller/Admin/AbstractCrudController.php

+ 4
- 3
Controller/Admin/AbstractCrudController.php Näytä tiedosto

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


Loading…
Peruuta
Tallenna