1
votes

I've implemented the SonataAdmin and SonataUserBundle into my project. With this I've created the Application\Sonata\UserBundle which has a User entity. This entity uses xml-mapping for Doctrine. I'm wondering if it's possible to change this configuration to annotations as I'm using annotations in the rest of my project.

Thx.

1
Please also see this solution which works fine for me: stackoverflow.com/questions/14042010/…webDEVILopers

1 Answers

1
votes
sonata.user.admin.user:
      class: %sonata.user.admin.user.class%
      tags:
        - { name: sonata.admin, manager_type: orm, group: Usuarios, label: Usuarios }
      arguments: [null, %sonata.user.admin.user.entity%, SonataAdminBundle:CRUD]
      calls:
        - [ setUserManager, [fos_user.user_manager]]

where sonata.user.admin.user.class and .entity are values set in your config file.

You should probably change your fos_user.user_manager also but i don't know what you use...