Edyadminbundle 4 $ this-> get (EntityRepository :: Class) Ошибка
use EasyCorp\Bundle\EasyAdminBundle\Orm\EntityRepository;
class CampaignCrudController extends AbstractCrudController
{
public function __construct(EntityRepository $entityRepository)
{
$this->entityRepository = $entityRepository;
}
public function createIndexQueryBuilder(SearchDto $searchDto, EntityDto $entityDto, FieldCollection $fields, FilterCollection $filters): ORMQueryBuilder
{
$response = $this->entityRepository->createQueryBuilder($searchDto, $entityDto, $fields, $filters);
$response->andWhere('entity.user = :user')->setParameter('user', $this->getUser());
return $response;
}
Happy Hippopotamus