Skip to content

Commit ecaa7da

Browse files
committed
Improved the explanation about the forward method
1 parent 2bd3244 commit ecaa7da

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

controller/forwarding.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ How to Forward Requests to another Controller
55
=============================================
66

77
Though not very common, you can also forward to another controller internally
8-
with the :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController::forward`
9-
method. Instead of redirecting the user's browser, this makes an "internal"
10-
sub-request and calls the defined controller. The ``forward()`` method returns
11-
the :class:`Symfony\\Component\\HttpFoundation\\Response` object that is returned
8+
with the ``forward()`` method provided by the
9+
:class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController` class
10+
(or :class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerTrait` if
11+
your controller doesn't extend from ``AbstractController``).
12+
13+
Instead of redirecting the user's browser, this makes an "internal" sub-request
14+
and calls the defined controller. The ``forward()`` method returns the
15+
:class:`Symfony\\Component\\HttpFoundation\\Response` object that is returned
1216
from *that* controller::
1317

1418
public function index($name)

0 commit comments

Comments
 (0)