form.xml 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. <services>
  4. <!-- profile form -->
  5. <service id="sonata.user.profile.form" class="Symfony\Component\Form\Form">
  6. <!-- NEXT_MAJOR: Uncomment Following line
  7. <factory class="Symfony\Component\Form\FormFactory" method="createNamed"/>
  8. -->
  9. <argument>%sonata.user.profile.form.name%</argument>
  10. <argument>%sonata.user.profile.form.type%</argument>
  11. <argument>null</argument>
  12. <argument type="collection">
  13. <argument key="validation_groups">%sonata.user.profile.form.validation_groups%</argument>
  14. <argument key="translation_domain">SonataUserBundle</argument>
  15. </argument>
  16. </service>
  17. <service id="sonata.user.profile.form.type" class="Sonata\UserBundle\Form\Type\ProfileType">
  18. <argument>%fos_user.model.user.class%</argument>
  19. <tag name="form.type" alias="sonata_user_profile"/>
  20. </service>
  21. <service id="sonata.user.profile.form.handler.default" class="Sonata\UserBundle\Form\Handler\ProfileFormHandler" scope="request" public="false">
  22. <argument type="service" id="sonata.user.profile.form"/>
  23. <argument type="service" id="request"/>
  24. <argument type="service" id="fos_user.user_manager"/>
  25. </service>
  26. <service id="sonata.user.form.gender_list" class="Sonata\UserBundle\Form\Type\UserGenderListType">
  27. <argument>%fos_user.model.user.class%</argument>
  28. <argument>getGenderList</argument>
  29. <argument>sonata_user_gender</argument>
  30. <tag name="form.type" alias="sonata_user_gender"/>
  31. </service>
  32. <service id="sonata.user.registration.form" class="Symfony\Component\Form\Form">
  33. <!-- NEXT_MAJOR: Uncomment Following line
  34. <factory class="Symfony\Component\Form\FormFactory" method="createNamed"/>
  35. -->
  36. <argument>%sonata.user.registration.form.name%</argument>
  37. <argument>%sonata.user.registration.form.type%</argument>
  38. <argument>null</argument>
  39. <argument type="collection">
  40. <argument key="validation_groups">%sonata.user.registration.form.validation_groups%</argument>
  41. </argument>
  42. </service>
  43. <service id="sonata.user.registration.form.type" class="Sonata\UserBundle\Form\Type\RegistrationFormType">
  44. <tag name="form.type" alias="sonata_user_registration"/>
  45. <argument>%fos_user.model.user.class%</argument>
  46. <argument>%sonata.user.registration.form.options%</argument>
  47. </service>
  48. <service id="sonata.user.registration.form.handler.default" class="Sonata\UserBundle\Form\Handler\RegistrationFormHandler" scope="request" public="false">
  49. <argument type="service" id="sonata.user.registration.form"/>
  50. <argument type="service" id="request"/>
  51. <argument type="service" id="fos_user.user_manager"/>
  52. <argument type="service" id="fos_user.mailer"/>
  53. <argument type="service" id="fos_user.util.token_generator"/>
  54. </service>
  55. </services>
  56. </container>