symfony-cmf / sonata-phpcr-admin-integration-bundle

Symfony CMF sonata PHPCR admin implementations
https://cmf.symfony.com
5 stars 20 forks source link

Generic Compiler Pass to replace admin class or document class #41

Open ElectricMaxxx opened 7 years ago

ElectricMaxxx commented 7 years ago

I currently had an idea how to replace the editable admin/document class configuration in a nice way. On my sandbox PR (https://github.com/symfony-cmf/cmf-sandbox/pull/332) i created a very specific compiler pass to replace the document class for the StaticContentAdmin, what about a configuration here like:

admin_classes:
    cmf_sonata_admin_integration.content.admin: My\Special\Admin\Class
    ....
document_classes:
   cmf_sonata_admin_integration.content.admin: AppBundle\Document\DemoSeoContent
   ....

We could then create a more generic compiler pass to replace the class or the 2. argument of a service (key) with the given value.

ElectricMaxxx commented 7 years ago

I think we won't need that on our first release, right @WouterJ ? Or why do you add it into the "Sprint 2.0 RC board"?