EasyAdminBundle icon indicating copy to clipboard operation
EasyAdminBundle copied to clipboard

Clean up default url generation

Open nbennett25 opened this issue 1 year ago • 0 comments

Create REST friendly url generation: instead of

/admin?crudAction=edit&crudControllerFqcn=App%5CController%5CAdmin%5CMyEntityCrudController&entityId=3

build the admin to work with either /key/value format:

/admin/action/edit/controller/myentity/id/3

or even better, map the keys to the values in the url positioning:

/admin/edit/myentity/3

Example of how to use this feature

$url = $this->adminUrlGenerator
                    ->setController(MyEntity::class)
                    ->setAction(Crud::PAGE_NEW)
                    ->setEntityId($id)
                    ->generateUrl();

nbennett25 avatar Jun 11 '24 16:06 nbennett25