Skip to content

Commit f806f65

Browse files
Baptouuuuweaverryan
authored andcommitted
removed call to deprecated getRequest() method
1 parent eb813a5 commit f806f65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

book/templating.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1500,9 +1500,9 @@ In many cases, you may want to allow a single controller to render multiple
15001500
different formats based on the "request format". For that reason, a common
15011501
pattern is to do the following::
15021502

1503-
public function indexAction()
1503+
public function indexAction(Request $request)
15041504
{
1505-
$format = $this->getRequest()->getRequestFormat();
1505+
$format = $request->getRequestFormat();
15061506

15071507
return $this->render('AcmeBlogBundle:Blog:index.'.$format.'.twig');
15081508
}

0 commit comments

Comments
 (0)