With Symfony 2.8, you can only pass FQCNs to the controller’s createForm method. So my question is: how do I pass the design parameters to the design of the form class when I create the form in the controller?
<Symfony 2.8 I could do (MyController.php):
$this->createForm(new MyForm($arg1, $arg2));
Symfony 2.8+ I can only do (MyController.php):
$this->createForm(MyForm::class);
So how can I pass construct arguments? These arguments are provided in the actions of the controller, so I cannot use the "Forms as Services" method ...
source share