How to access the entity inside the buildForm method of a form How to access the entity inside the buildForm method of a form symfony symfony

How to access the entity inside the buildForm method of a form


I found it:

public function buildForm(FormBuilderInterface $builder, array $options)   {        $entity = $builder->getData();        $builder->add('field');   }