Skip to content

Commit 0fbb1e0

Browse files
committed
removed call to deprecated getRequest() method
1 parent 741ad05 commit 0fbb1e0

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
@@ -1523,9 +1523,9 @@ In many cases, you may want to allow a single controller to render multiple
15231523
different formats based on the "request format". For that reason, a common
15241524
pattern is to do the following::
15251525

1526-
public function indexAction()
1526+
public function indexAction(Request $request)
15271527
{
1528-
$format = $this->getRequest()->getRequestFormat();
1528+
$format = $request->getRequestFormat();
15291529

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

0 commit comments

Comments
 (0)