如何将此配置从xml转换为yaml?
<service id="sonata.media.admin.media" class="%sonata.media.admin.media.class%">
...
<call method="setTemplates">
<argument type="collection">
<argument key="list">ApplicationSonataMediaBundle:MediaAdmin:list.html.twig</argument>
</argument>
</call>
...
</service>
谢谢!
答案 0 :(得分:9)
试试这个:
services:
sonata.media.admin.media:
class: %sonata.media.admin.media.class%
calls:
- [setTemplates, [list: "ApplicationSonataMediaBundle:MediaAdmin:list.html.twig"]]
答案 1 :(得分:2)
The online converter from Ross Tuck原来是一个很好的工具!