File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments