From f99d94eab663b69c0dba8f39a143af32803c5191 Mon Sep 17 00:00:00 2001 From: nilov Date: Mon, 27 Mar 2017 14:35:00 +0700 Subject: [PATCH] Compatibility with Symfony 3. Fix routes. --- Controller/ContentBlockController.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Controller/ContentBlockController.php b/Controller/ContentBlockController.php index 40bf60d..9b94da8 100644 --- a/Controller/ContentBlockController.php +++ b/Controller/ContentBlockController.php @@ -12,13 +12,13 @@ /** * Class ContentBlockController - * + * * @package GlavwebContentBlockBundle\Controller */ class ContentBlockController extends Controller { /** - * @Route("/content-block/save", name="content_block_save", requirements={"_method": "POST"}) + * @Route("/content-block/save", name="content_block_save", methods={"POST"}) * * @param Request $request * @return JsonResponse @@ -59,7 +59,7 @@ public function actionSave(Request $request) } /** - * @Route("/api/content-block/{name}", name="content_block_create", requirements={"_method": "POST"}) + * @Route("/api/content-block/{name}", name="content_block_create", methods={"POST"}) * * @param string $name * @return JsonResponse @@ -92,7 +92,7 @@ public function createAction($name) } /** - * @Route("/api/content-block/{name}", name="content_block_show", requirements={"_method": "GET"}) + * @Route("/api/content-block/{name}", name="content_block_show", methods={"GET"}) * * @param string $name * @return JsonResponse @@ -124,7 +124,7 @@ public function showAction($name) } /** - * @Route("/api/content-block/{name}", name="content_block_edit", requirements={"_method": "PUT"}) + * @Route("/api/content-block/{name}", name="content_block_edit", methods={"PUT"}) * * @param string $name * @param Request $request @@ -155,7 +155,7 @@ public function editAction($name, Request $request) } /** - * @Route("/api/content-block/{name}", name="content_block_remove", requirements={"_method": "DELETE"}) + * @Route("/api/content-block/{name}", name="content_block_remove", methods={"DELETE"}) * * @param string $name * @return JsonResponse