Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert xml to yaml, section "calls"

How I can convert this configuration from xml to 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>

Thanks!

like image 477
Ilya Poluhin Avatar asked Dec 20 '22 04:12

Ilya Poluhin


1 Answers

Try this :

services:
  sonata.media.admin.media:
     class: %sonata.media.admin.media.class%
     calls:
            - [setTemplates, [list: "ApplicationSonataMediaBundle:MediaAdmin:list.html.twig"]]

Docs here

like image 130
Manse Avatar answered Dec 27 '22 20:12

Manse