Permalink
Browse files

minor #3977 [WCM] removed call to deprecated getRequest() method (Bap…

…touuuu)

This PR was submitted for the 2.5 branch but it was merged into the 2.3 branch instead (closes #3977).

Discussion
----------

[WCM] removed call to deprecated getRequest() method

| Q                  | A
| ---------------- | ---
| Doc fix?        | yes
| New docs?   | no
| Applies to     | 2.5+
| Fixed tickets |

Commits
-------

0fbb1e0 removed call to deprecated getRequest() method
  • Loading branch information...
weaverryan committed Jul 2, 2014
2 parents eb813a5 + f806f65 commit 801c7565a3e6c0d440fb86f1b2fd4a076ff4399c
Showing with 2 additions and 2 deletions.
  1. +2 −2 book/templating.rst
@@ -1500,9 +1500,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');
}

0 comments on commit 801c756

Please sign in to comment.