Skip to content

Commit

Permalink
minor #3977 [WCM] removed call to deprecated getRequest() method (Bap…
Browse files Browse the repository at this point in the history
…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 801c756
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions book/templating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down

0 comments on commit 801c756

Please sign in to comment.