I'm currently using SonataAdminBundle for the creation of a Back Office and I've integrated SonataMediaBundle (app-dev version) 2 days ago. The edit/create template from sonata bundle however has some errors! I've fixed them (and they are just twig errors).
But I can't just make the changes in the vendor. What is the correct way to overwrite the SonataMediaBundle templates?
I've tried the classic AdminBundle way but it doesn't work! here's the code:
sonata.admin.media:
class: Acme\AdminBundle\Admin\MediaAdmin
tags:
- { name: sonata.admin, manager_type: orm, group: "Media Library", label: "Media" }
arguments:
- ~
- ~
- ~
- @sonata.media.pool
calls:
- [ setTemplate, [edit, AcmeAdminBundle:Media:edit.html.twig]]