sonata-project / SonataAdminBundle

The missing Symfony Admin Generator
https://docs.sonata-project.org/projects/SonataAdminBundle
MIT License
2.11k stars 1.26k forks source link

Make AdminExtension be aware of the AdminClass in addition to the model class #7858

Closed Hanmac closed 1 year ago

Hanmac commented 2 years ago

Feature Request

Currently AdminExtension either can be:

i would like more options available that i can use tag attributes to check if the AdminClass itself does extend/implement/uses a given class/interface/trait name.

A Possible Use Case would be if i make an Extension AbcExt, and say it should be added to all Admins that does implement Interface AbcInterface.

with that in place, the User only would need to implement that Interface, and the Extension would be added without the need of extra config.

VincentLanglet commented 2 years ago

This shouldn't be too hard to implements, the changes need to be done here: https://github.com/sonata-project/SonataAdminBundle/blob/4.x/src/DependencyInjection/Compiler/ExtensionCompilerPass.php

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.