@@ -29,19 +29,6 @@ public function index()
29
29
return $this->render('<?= $ route_name ; ?> /index.html.twig', ['<?= $ entity_var_plural ; ?> ' => $<?= $ entity_var_plural ; ?> ]);
30
30
}
31
31
32
- /**
33
- * @Route("/{<?= $ entity_identifier ; ?> }", name="show")
34
- * @Method("GET")
35
- */
36
- public function show(<?= $ entity_class_name ; ?> $<?= $ entity_var_singular ; ?> )
37
- {
38
- $deleteForm = $this->createDeleteForm($<?= $ entity_var_singular ; ?> );
39
-
40
- return $this->render('<?= $ route_name ; ?> /show.html.twig', [
41
- '<?= $ entity_var_singular ; ?> ' => $<?= $ entity_var_singular ; ?> ,
42
- ]);
43
- }
44
-
45
32
/**
46
33
* @Route("/new", name="new")
47
34
* @Method({"GET", "POST"})
@@ -66,6 +53,19 @@ public function new(Request $request)
66
53
]);
67
54
}
68
55
56
+ /**
57
+ * @Route("/{<?= $ entity_identifier ; ?> }", name="show")
58
+ * @Method("GET")
59
+ */
60
+ public function show(<?= $ entity_class_name ; ?> $<?= $ entity_var_singular ; ?> )
61
+ {
62
+ $deleteForm = $this->createDeleteForm($<?= $ entity_var_singular ; ?> );
63
+
64
+ return $this->render('<?= $ route_name ; ?> /show.html.twig', [
65
+ '<?= $ entity_var_singular ; ?> ' => $<?= $ entity_var_singular ; ?> ,
66
+ ]);
67
+ }
68
+
69
69
/**
70
70
* @Route("/{<?= $ entity_identifier ; ?> }/edit", name="edit")
71
71
* @Method({"GET", "POST"})
@@ -95,7 +95,7 @@ public function edit(Request $request, <?= $entity_class_name; ?> $<?= $entity_v
95
95
*/
96
96
public function delete(Request $request, <?= $ entity_class_name ; ?> $<?= $ entity_var_singular ; ?> )
97
97
{
98
- if (!$this->isCsrfTokenValid('delete'.$<?= $ entity_var_singular ; ?> ->get<?= ucfirst ($ entity_identifier ); ?> (), $request->request->get('token '))) {
98
+ if (!$this->isCsrfTokenValid('delete'.$<?= $ entity_var_singular ; ?> ->get<?= ucfirst ($ entity_identifier ); ?> (), $request->request->get('_token '))) {
99
99
return $this->redirectToRoute('<?= $ route_name ; ?> _index');
100
100
}
101
101
0 commit comments