admin_orm.xml 2.0 KB

12345678910111213141516171819202122232425262728293031
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
  3. <parameters>
  4. <parameter key="sonata.user.admin.groupname">sonata_user</parameter>
  5. <parameter key="sonata.user.admin.label_catalogue">SonataUserBundle</parameter>
  6. <parameter key="sonata.user.admin.groupicon"><![CDATA[<i class='fa fa-users'></i>]]></parameter>
  7. </parameters>
  8. <services>
  9. <service id="sonata.user.admin.user" class="%sonata.user.admin.user.class%">
  10. <tag name="sonata.admin" manager_type="orm" group="%sonata.user.admin.groupname%" label="users" label_catalogue="%sonata.user.admin.label_catalogue%" label_translator_strategy="sonata.admin.label.strategy.underscore" icon="%sonata.user.admin.groupicon%"/>
  11. <argument/>
  12. <argument>%sonata.user.admin.user.entity%</argument>
  13. <argument>%sonata.user.admin.user.controller%</argument>
  14. <call method="setUserManager">
  15. <argument type="service" id="fos_user.user_manager"/>
  16. </call>
  17. <call method="setTranslationDomain">
  18. <argument>%sonata.user.admin.user.translation_domain%</argument>
  19. </call>
  20. </service>
  21. <service id="sonata.user.admin.group" class="%sonata.user.admin.group.class%">
  22. <tag name="sonata.admin" manager_type="orm" group="%sonata.user.admin.groupname%" label="groups" label_catalogue="%sonata.user.admin.label_catalogue%" label_translator_strategy="sonata.admin.label.strategy.underscore"/>
  23. <argument/>
  24. <argument>%sonata.user.admin.group.entity%</argument>
  25. <argument>%sonata.user.admin.group.controller%</argument>
  26. <call method="setTranslationDomain">
  27. <argument>%sonata.user.admin.group.translation_domain%</argument>
  28. </call>
  29. </service>
  30. </services>
  31. </container>