Access Entity in configureActions - Easyadmin 4 with Symfony 7

42 Views Asked by At

i want to create an action link with the following code in my CompanyCrudController (configureFilters function):

$urlDomains = $this->adminUrlGenerator
        ->setController(DomainCrudController::class)
        ->setAction(Action::INDEX)
        ->set('filters[company][comparison]', '=')
        ->set('filters[company][value]', '1')
        ->generateUrl();

With this code I am redirected to the DomainCrudController and, among other things, the filter for the company is set (here value = 1). Now the value for the company should be automatically set to the respective EntityID.

How i get the entity in the configureActions() method?

0

There are 0 best solutions below