From 96a6e17b852f6780e4f5e1ce6177d79246203eff Mon Sep 17 00:00:00 2001 From: keefe kwan Date: Sat, 13 Dec 2014 10:37:55 -0700 Subject: [PATCH 1/3] Update controllers.rst Added in Route/ParamConverter use statements and @ParamConverter annotation --- best_practices/controllers.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/best_practices/controllers.rst b/best_practices/controllers.rst index 5d34928526b..dd7bd6bce81 100644 --- a/best_practices/controllers.rst +++ b/best_practices/controllers.rst @@ -136,8 +136,12 @@ For example: .. code-block:: php + use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; + use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; + /** * @Route("/{id}", name="admin_post_show") + * @ParamConverter("post", class="AppBundle:Post") */ public function showAction(Post $post) { From d43f7208d62379e155f67c763ada2c1ceaeec53e Mon Sep 17 00:00:00 2001 From: keefe kwan Date: Tue, 16 Dec 2014 13:23:58 -0700 Subject: [PATCH 2/3] Update controllers.rst Removed annotation per request. --- best_practices/controllers.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/best_practices/controllers.rst b/best_practices/controllers.rst index dd7bd6bce81..390f42f3098 100644 --- a/best_practices/controllers.rst +++ b/best_practices/controllers.rst @@ -141,7 +141,6 @@ For example: /** * @Route("/{id}", name="admin_post_show") - * @ParamConverter("post", class="AppBundle:Post") */ public function showAction(Post $post) { From 52f504a221e5c6a451b49e386cc0c27bb302aa4e Mon Sep 17 00:00:00 2001 From: keefe kwan Date: Tue, 16 Dec 2014 13:32:38 -0700 Subject: [PATCH 3/3] Update controllers.rst Removed use statement. --- best_practices/controllers.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/best_practices/controllers.rst b/best_practices/controllers.rst index 390f42f3098..369d7be4e4c 100644 --- a/best_practices/controllers.rst +++ b/best_practices/controllers.rst @@ -137,8 +137,7 @@ For example: .. code-block:: php use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; - use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; - + /** * @Route("/{id}", name="admin_post_show") */