public function onRequest(GetResponseEvent $event)
    {
        if (!$event->isMasterRequest()) {
            return;
        }

        if (!$session = $event->getRequest()->getSession()) {
            return;
        }

        if ($this->debugLoggedOff || ($session->isStarted() && $session->has('authentication'))) {
            $this->dispatcher->addSubscriber($this->listener);
        }
    }
public function onRequest(GetResponseEvent $event)
    {
        if (!$event->isMasterRequest()) {
            return;
        }

        if (!$session = $event->getRequest()->getSession()) {
            return;
        }

        if ($this->debugLoggedOff || ($session->isStarted() && $session->has('authentication'))) {
            $this->dispatcher->addSubscriber($this->listener);
        }
    }
public function onRequest ( GetResponseEvent $ event ) { if ( ! $ event -> isMasterRequest ( ) ) { return ; } if ( ! $ session = $ event -> getRequest ( ) -> getSession ( ) ) { return ; } if ( $ this -> debugLoggedOff || ( $ session -> isStarted ( ) && $ session -> has ( 'authentication' ) ) ) { $ this -> dispatcher -> addSubscriber ( $ this -> listener ) ; } }
Enable toolbar if logged in or debug mode is enabled.

@param GetResponseEvent $event
Enable toolbar if logged in or debug mode is enabled .