Skip to content

Commit 384c2ec

Browse files
committed
minor #11096 Improved the explanation about the forward method (javiereguiluz)
This PR was merged into the 4.2 branch. Discussion ---------- Improved the explanation about the forward method This fixes #11095 differently. Commits ------- ecaa7da Improved the explanation about the forward method
2 parents ee0e6e6 + ecaa7da commit 384c2ec

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)