Skip to content

Commit f5054df

Browse files
authored
Update Controller.tpl.php to use createView() method by default
1 parent 81eb8d9 commit f5054df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

templates/crud/controller/Controller.tpl.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function new(Request $request, EntityManagerInterface $entityManager): Re
4545

4646
return $this->render('<?= $templates_path ?>/new.html.twig', [
4747
'<?= $entity_twig_var_singular ?>' => $<?= $entity_var_singular ?>,
48-
'form' => $form,
48+
'form' => $form->createView(),
4949
]);
5050
}
5151

@@ -71,7 +71,7 @@ public function edit(Request $request, <?= $entity_class_name ?> $<?= $entity_va
7171

7272
return $this->render('<?= $templates_path ?>/edit.html.twig', [
7373
'<?= $entity_twig_var_singular ?>' => $<?= $entity_var_singular ?>,
74-
'form' => $form,
74+
'form' => $form->createView(),
7575
]);
7676
}
7777

0 commit comments

Comments
 (0)