advanced_configuration.rst 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. Advanced Configuration
  2. ======================
  3. Full configuration options:
  4. .. code-block:: yaml
  5. fos_user:
  6. db_driver: orm # can be orm or odm
  7. firewall_name: main
  8. user_class: Application\Sonata\UserBundle\Entity\User
  9. group:
  10. group_class: Application\Sonata\UserBundle\Entity\Group
  11. profile: # Authentication Form
  12. form:
  13. type: fos_user_profile
  14. handler: fos_user.profile.form.handler.default
  15. name: fos_user_profile_form
  16. validation_groups: [Authentication] # Please note : this is not the default value
  17. sonata_user:
  18. security_acl: false
  19. impersonating_route: homepage # or any route you want to use
  20. class:
  21. user: Application\Sonata\UserBundle\Entity\User
  22. group: Application\Sonata\UserBundle\Entity\Group
  23. profile: # Profile Form (firstname, lastname, etc ...)
  24. form:
  25. type: sonata.user.profile
  26. handler: sonata.user.profile.form.handler.default
  27. name: sonata_user_profile_form
  28. validation_groups: [Profile]
  29. # Enable Doctrine to map the provided entities
  30. doctrine:
  31. orm:
  32. entity_managers:
  33. default:
  34. mappings:
  35. FOSUserBundle: ~
  36. ApplicationSonataUserBundle: ~
  37. SonataUserBundle: ~