@@ -201,7 +201,8 @@ see :ref:`controller-string-syntax`.
201
201
202
202
.. tip ::
203
203
204
- You can learn much more about the routing system in the :doc: `Routing chapter </book/routing >`.
204
+ You can learn much more about the routing system in the
205
+ :doc: `Routing chapter </book/routing >`.
205
206
206
207
.. index ::
207
208
single: Controller; Controller arguments
@@ -225,15 +226,15 @@ to that method::
225
226
{
226
227
public function indexAction($name)
227
228
{
228
- // ...
229
+ // ...
229
230
}
230
231
}
231
232
232
233
The controller has a single argument, ``$name ``, which corresponds to the
233
234
``{name} `` parameter from the matched route (``ryan `` in the example). In
234
235
fact, when executing your controller, Symfony matches each argument of
235
- the controller with a parameter from the matched route. Take the following
236
- example:
236
+ the controller with a parameter from the matched route by its name . Take the
237
+ following example:
237
238
238
239
.. configuration-block ::
239
240
@@ -421,15 +422,17 @@ Common Controller Tasks
421
422
Though a controller can do virtually anything, most controllers will perform
422
423
the same basic tasks over and over again. These tasks, such as redirecting,
423
424
forwarding, rendering templates and accessing core services, are very easy
424
- to manage in Symfony.
425
+ to manage in Symfony when you're extending the base `` Controller `` class .
425
426
426
427
.. index ::
427
428
single: Controller; Redirecting
428
429
429
430
Redirecting
430
431
~~~~~~~~~~~
431
432
432
- If you want to redirect the user to another page, use the ``redirect() `` method::
433
+ If you want to redirect the user to another page, use the
434
+ :method: `Symfony\\ Bundle\\ FrameworkBundle\\ Controller\\ Controller::redirect `
435
+ method::
433
436
434
437
public function indexAction()
435
438
{
0 commit comments