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

        $session = $event->getRequest()->getSession();
        if ($session && $session->isStarted()) {
            $this->attachFlashBag($session);
        }
    }
public function onEvent($event)
    {
        if (!$event->isMasterRequest()) {
            return;
        }

        $session = $event->getRequest()->getSession();
        if ($session && $session->isStarted()) {
            $this->attachFlashBag($session);
        }
    }
public function onEvent ( $ event ) { if ( ! $ event -> isMasterRequest ( ) ) { return ; } $ session = $ event -> getRequest ( ) -> getSession ( ) ; if ( $ session && $ session -> isStarted ( ) ) { $ this -> attachFlashBag ( $ session ) ; } }
Attach session's flash bag to flash logger if it is started.

@param GetResponseEvent|FilterResponseEvent $event
Attach session s flash bag to flash logger if it is started .