From cfc9c3a55576aa7378ace576962b5e15911eb392 Mon Sep 17 00:00:00 2001 From: Andrey Bolonin Date: Wed, 5 Sep 2018 17:31:28 +0300 Subject: [PATCH] Update locale_sticky_session.rst --- session/locale_sticky_session.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/session/locale_sticky_session.rst b/session/locale_sticky_session.rst index b81c8e6cb3c..11fa1a2b67f 100644 --- a/session/locale_sticky_session.rst +++ b/session/locale_sticky_session.rst @@ -139,11 +139,11 @@ want to use this as the locale for the given user. To accomplish this, you can hook into the login process and update the user's session with this locale value before they are redirected to their first page. -To do this, you need an event subscriber on the ``security.interactive_login`` +To do this, you need an event listener on the ``security.interactive_login`` event:: - // src/EventSubscriber/UserLocaleSubscriber.php - namespace App\EventSubscriber; + // src/EventListener/UserLocaleListener.php + namespace App\EventListener; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpFoundation\Session\SessionInterface; @@ -154,7 +154,7 @@ event:: * Stores the locale of the user in the session after the * login. This can be used by the LocaleSubscriber afterwards. */ - class UserLocaleSubscriber implements EventSubscriberInterface + class UserLocaleListener implements EventSubscriberInterface { private $session;