Skip to content

Commit 42ba278

Browse files
committed
bug #5037 Finish 4644: Update the_controller.rst (teggen, WouterJ)
This PR was merged into the 2.3 branch. Discussion ---------- Finish 4644: Update the_controller.rst Replaces #4644 | Q | A | --- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | - Commits ------- dbc25a6 Removed forwarding section from the quick tour 17c9257 Update the_controller.rst 77342fa Update the_controller.rst
2 parents 912682a + dbc25a6 commit 42ba278

File tree

1 file changed

+4
-19
lines changed

1 file changed

+4
-19
lines changed

quick_tour/the_controller.rst

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,10 @@ The ``hello`` action will now match URLs like ``/hello/fabien.xml`` or
172172
like ``/hello/fabien.js``, because the value of the ``_format`` variable doesn't
173173
meet its requirements.
174174

175-
Redirecting and Forwarding
176-
--------------------------
175+
.. _redirecting-and-forwarding:
176+
177+
Redirecting
178+
-----------
177179

178180
If you want to redirect the user to another page, use the ``redirectToRoute()``
179181
method::
@@ -193,23 +195,6 @@ method::
193195
The ``redirectToRoute()`` method takes as arguments the route name and an optional
194196
array of parameters and redirects the user to the URL generated with those arguments.
195197

196-
You can also internally forward the action to another action of the same or
197-
different controller using the ``forward()`` method::
198-
199-
// src/AppBundle/Controller/DefaultController.php
200-
class DefaultController extends Controller
201-
{
202-
/**
203-
* @Route("/", name="homepage")
204-
*/
205-
public function indexAction()
206-
{
207-
return $this->forward('AppBundle:Blog:index', array(
208-
'name' => $name
209-
);
210-
}
211-
}
212-
213198
Displaying Error Pages
214199
----------------------
215200

0 commit comments

Comments
 (0)