From c31b21bb5ae6a3c8509ebd7b253067c04b1d87cc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Fri, 8 Mar 2024 01:31:19 +0100 Subject: [PATCH 1/1] Shorten air bundle route alias --- Controller/SnippetController.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Controller/SnippetController.php b/Controller/SnippetController.php index 0c9bc3d..7182021 100644 --- a/Controller/SnippetController.php +++ b/Controller/SnippetController.php @@ -45,7 +45,7 @@ class SnippetController extends DefaultController { //Set options [ //Set the action - 'action' => $this->generateUrl('rapsys_air_snippet_add', ['location' => $request->get('location')]), + 'action' => $this->generateUrl('rapsysair_snippet_add', ['location' => $request->get('location')]), //Set the form attribute 'attr' => [] ] @@ -138,7 +138,7 @@ class SnippetController extends DefaultController { unset($route['_route'], $route['_controller']); //Check if snippet view route - if ($name == 'rapsys_air_user_view' && !empty($route['id'])) { + if ($name == 'rapsysair_user_view' && !empty($route['id'])) { //Replace id $route['id'] = $snippet->getUser()->getId(); //Other routes @@ -157,7 +157,7 @@ class SnippetController extends DefaultController { } //Redirect to cleanup the form - return $this->redirectToRoute('rapsys_air', ['snippet' => $snippet->getId()]); + return $this->redirectToRoute('rapsysair', ['snippet' => $snippet->getId()]); } /** @@ -197,7 +197,7 @@ class SnippetController extends DefaultController { //Set options [ //Set the action - 'action' => $this->generateUrl('rapsys_air_snippet_edit', ['id' => $id]), + 'action' => $this->generateUrl('rapsysair_snippet_edit', ['id' => $id]), //Set the form attribute 'attr' => [] ] @@ -322,7 +322,7 @@ class SnippetController extends DefaultController { unset($route['_route'], $route['_controller']); //Check if snippet view route - if ($name == 'rapsys_air_user_view' && !empty($route['id'])) { + if ($name == 'rapsysair_user_view' && !empty($route['id'])) { //Replace id $route['id'] = $snippet->getUser()->getId(); //Other routes @@ -341,6 +341,6 @@ class SnippetController extends DefaultController { } //Redirect to cleanup the form - return $this->redirectToRoute('rapsys_air', ['snippet' => $snippet->getId()]); + return $this->redirectToRoute('rapsysair', ['snippet' => $snippet->getId()]); } } -- 2.41.1