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