Sonata User Admin - Custom field dependency
问题 I have extended the SonataAdmin class for FOSUser and added 2 custom fields (choice type from external data source): Company and Sector I'd like to make Sector dependent on Company , so if the user selects a Company it filters the available Sectors. I though about using FormEvents for filtering at page load, but I don't even know how to get the Company value of the current form. Here is a part of my custom SectorType public function buildForm(FormBuilderInterface $builder, array $options) {