Closed tbyte80 closed 3 years ago
It's not because I close the issue that you cant answer in it. Opening another one wont do anything.
You have to create another service to implement the RouteGeneratorInterface. And configure the admin class to use this service instead of the default one.
The generateUrl could basically be deprecated and removed as it's just an alias.
If you dont know how to do this, there is documentation, which might be improved but I think there is already section about how to override a service. And there is also a slack channel.
I am referencing this issue for clarity:
https://github.com/sonata-project/SonataAdminBundle/issues/7441
Implementing RouteGeneratorInterface in custom Admin class is not possible because:
Quite frankly I think declaring methods final causes a lot of friction with questionable benefits. Why hinder people overriding methods that are useful? If it's about maintenance why not at least declare them internal so people are aware of potential BC breaks.