Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 282fd8a

Browse filesBrowse files
committed
feature #6174 Missing reference docs for kernel.finish_request event (acrobat)
This PR was merged into the 2.7 branch. Discussion ---------- Missing reference docs for kernel.finish_request event | Q | A | ------------- | --- | Doc fix? | yes | New docs? | yes - missing docs (PR symfony/symfony#8904) | Applies to | Event was added in 2.4 so added to **2.7** docs | Fixed tickets | #6151 Commits ------- aad2b89 Missing reference docs for kernel.finish_request event
2 parents 52cd29b + aad2b89 commit 282fd8a
Copy full SHA for 282fd8a

File tree

1 file changed

+29
-0
lines changed
Filter options

1 file changed

+29
-0
lines changed

‎reference/events.rst

Copy file name to clipboardExpand all lines: reference/events.rst
+29Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,35 @@ Listener Class Name
158158
:class:`Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener` -1024
159159
=================================================================================== ========
160160

161+
``kernel.finish_request``
162+
~~~~~~~~~~~~~~~~~~~~~~~~~
163+
164+
**Event Class**: :class:`Symfony\\Component\\HttpKernel\\Event\\FinishRequestEvent`
165+
166+
The purpose of this event is to allow you to reset the global and environmental state of
167+
the application after a sub-request has finished::
168+
169+
public function onKernelFinishRequest(FinishRequestEvent $event)
170+
{
171+
if (null === $parentRequest = $this->requestStack->getParentRequest()) {
172+
return;
173+
}
174+
175+
//Reset the locale of the subrequest to the locale of the parent request
176+
$this->setLocale($parentRequest);
177+
}
178+
179+
These are the built-in Symfony listeners related to this event:
180+
181+
========================================================================== ========
182+
Listener Class Name Priority
183+
========================================================================== ========
184+
:class:`Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener` 0
185+
:class:`Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener` 0
186+
:class:`Symfony\\Component\\HttpKernel\\EventListener\\RouterListener` 0
187+
:class:`Symfony\\Component\\Security\\Http\\Firewall` 0
188+
========================================================================== ========
189+
161190
``kernel.terminate``
162191
~~~~~~~~~~~~~~~~~~~~
163192

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.