From 6454709f8fda51b4e5b53acad2c9f54f8950b236 Mon Sep 17 00:00:00 2001 From: Matt Smith Date: Sun, 22 Jan 2023 23:55:13 +0000 Subject: [PATCH] Update Controller.tpl.php renderForm deprecated, now render can take form as second argument --- .../crud/controller/Controller.tpl.php | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/Resources/skeleton/crud/controller/Controller.tpl.php b/src/Resources/skeleton/crud/controller/Controller.tpl.php index c50bea82e..f2968370d 100644 --- a/src/Resources/skeleton/crud/controller/Controller.tpl.php +++ b/src/Resources/skeleton/crud/controller/Controller.tpl.php @@ -54,17 +54,10 @@ public function new(Request $request, EntityManagerInterface $entityManager): Re } - - return $this->renderForm('/new.html.twig', [ - '' => $, - 'form' => $form, - ]); - return $this->render('/new.html.twig', [ '' => $, - 'form' => $form->createView(), + 'form' => $form, ]); - } generateRouteForControllerMethod(sprintf('/{%s}', $entity_identifier), sprintf('%s_show', $route_name), ['GET']) ?> @@ -99,17 +92,10 @@ public function edit(Request $request, $ - - return $this->renderForm('/edit.html.twig', [ - '' => $, - 'form' => $form, - ]); - return $this->render('/edit.html.twig', [ '' => $, - 'form' => $form->createView(), + 'form' => $form, ]); - } generateRouteForControllerMethod(sprintf('/{%s}', $entity_identifier), sprintf('%s_delete', $route_name), ['POST']) ?>