SonataAdminBundle gives a method configureFormFields
when you extend the Admin
class.
That method takes a FormMapper
class.
For the entity that I have created this class for, I have already built a FormType
class in the typical Symfony fashion.
How can I use that class instead of having to define the form properties again using the FormMapper
?
something like:
public function configureFormFields(FormMapper $formMapper)
{
$form = new ReviewFormType();
$form->buildForm($formMapper->getFormBuilder(),array());
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With