]> Raphaƫl G. Git Repositories - userbundle/blobdiff - Listener/LogoutListener.php
Remove guestid and guestgroup in favour of more reliable defaultgroup
[userbundle] / Listener / LogoutListener.php
index 304f123bd16a094588f82755d3df38dc909b6984..85612502875cd07f058013f02914440a5fa74950 100644 (file)
@@ -11,6 +11,8 @@
 
 namespace Rapsys\UserBundle\Listener;
 
+use Rapsys\UserBundle\RapsysUserBundle;
+
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
 use Symfony\Component\HttpFoundation\RedirectResponse;
@@ -23,8 +25,6 @@ use Symfony\Component\Routing\RequestContext;
 use Symfony\Component\Routing\RouterInterface;
 use Symfony\Component\Security\Http\Event\LogoutEvent;
 
-use Rapsys\UserBundle\RapsysUserBundle;
-
 /**
  * {@inheritdoc}
  */
@@ -34,26 +34,15 @@ class LogoutListener implements EventSubscriberInterface {
         */
        protected $config;
 
-       /**
-        * Target url
-        */
-       private $targetUrl;
-
        /**
         * {@inheritdoc}
         *
         * @xxx Second argument will be replaced by security.firewalls.main.logout.target
         * @see vendor/symfony/security-bundle/Resources/config/security_listeners.php +79
         */
-       public function __construct(ContainerInterface $container, string $targetUrl, RouterInterface $router) {
+       public function __construct(protected ContainerInterface $container, protected string $targetUrl, protected RouterInterface $router) {
                //Set config
                $this->config = $container->getParameter(RapsysUserBundle::getAlias());
-
-               //Set target url
-               $this->targetUrl = $targetUrl;
-
-               //Set router
-               $this->router = $router;
        }
 
        /**