Skip to content

Commit a6bcf69

Browse files
committed
fix missing entity manager
1 parent a9b817d commit a6bcf69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Resources/skeleton/crud/controller/Controller.tpl.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use <?= $form_full_class_name ?>;
77
<?php if (isset($repository_full_class_name)): ?>
88
use <?= $repository_full_class_name ?>;
9-
<?php else ?>
9+
<?php else: ?>
1010
use Doctrine\ORM\EntityManagerInterface;
1111
<?php endif; ?>
1212
use Symfony\Bundle\FrameworkBundle\Controller\<?= $parent_class_name ?>;
@@ -48,7 +48,7 @@ public function index(EntityManagerInterface $entityManager): Response
4848
<?php if (isset($repository_full_class_name) && $generator->repositoryHasAddRemoveMethods($repository_full_class_name)) { ?>
4949
public function new(Request $request, <?= $repository_class_name ?> $<?= $repository_var ?>): Response
5050
<?php } else { ?>
51-
public function new(Request $request): Response
51+
public function new(Request $request, EntityManagerInterface $entityManager): Response
5252
<?php } ?>
5353
{
5454
$<?= $entity_var_singular ?> = new <?= $entity_class_name ?>();

0 commit comments

Comments
 (0)