SonataAdmin - Customize field list

159 views
Skip to first unread message

Pierre de LESPINAY

unread,
Jul 2, 2012, 8:41:54 AM7/2/12
to sonata...@googlegroups.com
I have installed SonataUser and using it with SonataAdmin.
By default there are many fields defined for the user entity.
I'd like to hide/disable many social and profile fields.
Could you point the right direction/documentation to remove certain field of the user editor ?
(I'm quite new to Symfony2)

Pierre de LESPINAY

unread,
Jul 3, 2012, 4:33:38 AM7/3/12
to sonata...@googlegroups.com
Should I override the configureFormFields() interface function in app/Application/Sonata/UserBundle/Admin/Model/UserAdmin.php ?
Is it the right way to go ?

Thomas Rabaix

unread,
Jul 11, 2012, 7:05:57 PM7/11/12
to sonata...@googlegroups.com
The best way to change the behavior of an existing admin class, you need to create a service that implement the AdminExtensionInterface

    vendor.admin.product_extension:
        class: Application\Sonata\ProductBundle\Admin\ProductAdmin
        tags:
            - { name: sonata.admin.extension, target: sonata.product.admin.product }



--
You received this message because you are subscribed to the Google Groups "sonata-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/sonata-users/-/8OoM_RPWccEJ.

To post to this group, send email to sonata...@googlegroups.com.
To unsubscribe from this group, send email to sonata-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sonata-users?hl=en.



--
Thomas Rabaix
http://rabaix.net | http://sonata-project.org

Reply all
Reply to author
Forward
0 new messages