Browse Source

Filtre section & merchant

feature/ticket
Fab 3 years ago
parent
commit
b071cfd41b
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      Controller/Admin/AbstractCrudController.php

+ 4
- 3
Controller/Admin/AbstractCrudController.php View File

@@ -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…
Cancel
Save