SetTemplate in services.yaml doesn't work with my own template

孤街醉人 提交于 2019-12-11 16:29:37

问题


I have a Sonata Admin and I wanna replace his template with another one, but doesn't work, currently my app is running in Symfony 4.3 and the folder structure changes with symfony version and I don't know if my error is in that place.

admin.expediente_compra:
    class: App\Admin\ExpedienteCompraAdmin
    arguments: [~, App\Entity\ExpedienteCompra, App\Controller\ExpedienteCompraAdminController]
    calls:
        - [setTemplate, ['edit', 'ExpedienteCompra/edit.html.twig']]
    tags:
        - { name: sonata.admin, manager_type: orm, group: admin, label: ExpedienteCompra }
    public: true

My template is located in:

templates/ExpedienteCompra/edit.html.twig

Inside Symfony Profiler shows

来源:https://stackoverflow.com/questions/58674827/settemplate-in-services-yaml-doesnt-work-with-my-own-template

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!