diff --git a/templates/crud/controller/Controller.tpl.php b/templates/crud/controller/Controller.tpl.php index 63901dc58..886ec443e 100644 --- a/templates/crud/controller/Controller.tpl.php +++ b/templates/crud/controller/Controller.tpl.php @@ -45,7 +45,7 @@ public function new(Request $request, EntityManagerInterface $entityManager): Re return $this->render('/new.html.twig', [ '' => $, - 'form' => $form, + 'form' => $form->createView(), ]); } @@ -71,7 +71,7 @@ public function edit(Request $request, $render('/edit.html.twig', [ '' => $, - 'form' => $form, + 'form' => $form->createView(), ]); } diff --git a/tests/fixtures/make-crud/expected/WithCustomRepository.php b/tests/fixtures/make-crud/expected/WithCustomRepository.php index 9dc2eb8e9..38527030f 100644 --- a/tests/fixtures/make-crud/expected/WithCustomRepository.php +++ b/tests/fixtures/make-crud/expected/WithCustomRepository.php @@ -38,7 +38,7 @@ public function new(Request $request, EntityManagerInterface $entityManager): Re return $this->render('sweet_food/new.html.twig', [ 'sweet_food' => $sweetFood, - 'form' => $form, + 'form' => $form->createView(), ]); } @@ -64,7 +64,7 @@ public function edit(Request $request, SweetFood $sweetFood, EntityManagerInterf return $this->render('sweet_food/edit.html.twig', [ 'sweet_food' => $sweetFood, - 'form' => $form, + 'form' => $form->createView(), ]); }