8000 minor #12408 Update events.rst (ddegasperi) · symfony/symfony-docs@884f721 · GitHub
[go: up one dir, main page]

Skip to content

Commit 884f721

Browse files
committed
minor #12408 Update events.rst (ddegasperi)
This PR was submitted for the master branch but it was merged into the 4.3 branch instead (closes #12408). Discussion ---------- Update events.rst <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Commits ------- c00b90d Update events.rst
2 parents ec16653 + c00b90d commit 884f721

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

reference/events.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ Typically, this is used to map URL routing parameters to their corresponding
8787
named arguments; or pass the current request when the ``Request`` type-hint is
8888
found::
8989

90+
use Symfony\Component\HttpKernel\Event\ControllerArgumentsEvent;
91+
9092
public function onKernelControllerArguments(ControllerArgumentsEvent $event)
9193
{
9294
// ...
@@ -149,6 +151,8 @@ This event is dispatched after the controller or any ``kernel.view`` listener
149151
returns a ``Response`` object. It's useful to modify or replace the response
150152
before sending it back (e.g. add/modify HTTP headers, add cookies, etc.)::
151153

154+
use Symfony\Component\HttpKernel\Event\ResponseEvent;
155+
152156
public function onKernelResponse(ResponseEvent $event)
153157
{
154158
$response = $event->getResponse();
@@ -176,6 +180,8 @@ This event is dispatched after the ``kernel.response`` event. It's useful to res
176180
the global state of the application (for example, the translator listener resets
177181
the translator's locale to the one of the parent request)::
178182

183+
use Symfony\Component\HttpKernel\Event\FinishRequestEvent;
184+
179185
public function onKernelFinishRequest(FinishRequestEvent $event)
180186
{
181187
if (null === $parentRequest = $this->requestStack->getParentRequest()) {

0 commit comments

Comments
 (0)
0