Extending Sonata User Bundle and adding new fields [closed]

1. Create a new bundle Something like AcmeUserBundle. Create it and register it as you do normally. 2. Create a new User entity Then create a User and Group entity which extends Sonata\UserBundle\Entity\BaseUser and Sonata\UserBundle\Entity\BaseGroup. You should also add the configuration for the primary key, for instance: /** * @ORM\Entity * @ORM\Table(name=”fos_user”) */ class User … Read more

How to use Ajax within Sonata Admin forms?

I was able to make this work a few months back. While what a.aitboudad has shared is accurate. There are a few gotcha’s that first timers with Symfony/Sonata might face. Here are the steps. 1> Extend Sonata CRUD’s edit.html.twig / base_edit.html.twig . For simplicity, I’ll use only the latter. Copy vendor/bundles/Sonata/AdminBundle/Resources/views/CRUD/base_edit.html.twig into the views folder … Read more