Skip to content

Commit 864f6d0

Browse files
authored
Update Controller.tpl.php
1 parent ce60831 commit 864f6d0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

templates/crud/controller/Controller.tpl.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#[Route('<?= $route_path ?>')]
88
<?= $class_data->getClassDeclaration() ?>
99
{
10-
<?= $generator->generateRouteForControllerMethod('', sprintf('%s_index', $route_name), ['GET']) ?>
10+
<?= $generator->generateRouteForControllerMethod('', sprintf('%s_index', $route_name), 'GET') ?>
1111
<?php if (isset($repository_full_class_name)): ?>
1212
public function index(<?= $repository_class_name ?> $<?= $repository_var ?>): Response
1313
{
@@ -48,7 +48,7 @@ public function new(Request $request, EntityManagerInterface $entityManager): Re
4848
]);
4949
}
5050

51-
<?= $generator->generateRouteForControllerMethod(sprintf('/{%s}', $entity_identifier), sprintf('%s_show', $route_name), ['GET']) ?>
51+
<?= $generator->generateRouteForControllerMethod(sprintf('/{%s}', $entity_identifier), sprintf('%s_show', $route_name), 'GET') ?>
5252
public function show(<?= $entity_class_name ?> $<?= $entity_var_singular ?>): Response
5353
{
5454
return $this->render('<?= $templates_path ?>/show.html.twig', [
@@ -74,7 +74,7 @@ public function edit(Request $request, <?= $entity_class_name ?> $<?= $entity_va
7474
]);
7575
}
7676

77-
<?= $generator->generateRouteForControllerMethod(sprintf('/{%s}', $entity_identifier), sprintf('%s_delete', $route_name), ['POST']) ?>
77+
<?= $generator->generateRouteForControllerMethod(sprintf('/{%s}', $entity_identifier), sprintf('%s_delete', $route_name), 'POST') ?>
7878
public function delete(Request $request, <?= $entity_class_name ?> $<?= $entity_var_singular ?>, EntityManagerInterface $entityManager): Response
7979
{
8080
if ($this->isCsrfTokenValid('delete'.$<?= $entity_var_singular ?>->get<?= ucfirst($entity_identifier) ?>(), $request->getPayload()->getString('_token'))) {

0 commit comments

Comments
 (0)