Old approach
$form = $this->createForm(new OnBoardingAgreementType($em), $doc, ["editMode" => true]); New approach How to pass $ em to the form designer?
$form = $this->createForm(OnBoardingAgreementType::class, $doc, ["editMode" => true]); true]); New approach ...">
Source: https://ru.stackoverflow.com/questions/499409/
All Articles
arguments: ["@doctrine"]doctrine to the servicearguments: ["@doctrine"], and in the form class already call the entity manager something like this:$this->var_for_doctrine_from->getManager();- S. Pronin