Utility/FlashableTrait.php
protected function addUserFlash(SessionInterface $session, $type, $message)
    {
        $session->getFlashBag()->add($type, $message);
    }
protected function addUserFlash(SessionInterface $session, $type, $message)
    {
        $session->getFlashBag()->add($type, $message);
    }
protected function addUserFlash ( SessionInterface $ session , $ type , $ message ) { $ session -> getFlashBag ( ) -> add ( $ type , $ message ) ; }
Adds a flash message to the given session.

@param \Symfony\Component\HttpFoundation\Session\SessionInterface $session
@param string $type
@param string $message
Adds a flash message to the given session .