From 0fbb1e095fb28ac56304a7b2c92194ac47e2cd45 Mon Sep 17 00:00:00 2001 From: Baptiste Langlade Date: Thu, 26 Jun 2014 09:21:58 +0200 Subject: [PATCH] removed call to deprecated getRequest() method --- book/templating.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/book/templating.rst b/book/templating.rst index cfc6a1414e8..f04fc656a48 100644 --- a/book/templating.rst +++ b/book/templating.rst @@ -1523,9 +1523,9 @@ In many cases, you may want to allow a single controller to render multiple different formats based on the "request format". For that reason, a common pattern is to do the following:: - public function indexAction() + public function indexAction(Request $request) { - $format = $this->getRequest()->getRequestFormat(); + $format = $request->getRequestFormat(); return $this->render('AcmeBlogBundle:Blog:index.'.$format.'.twig'); }