protected function rename($type, $value, $domain)
    {
        $flashBag = $this->getSession()->getFlashBag();

        foreach ($flashBag->get($value) as $message) {
            $message = $this->getTranslator()->trans($message, [], $domain);
            $flashBag->add($type, $message);
        }
    }
protected function rename($type, $value, $domain)
    {
        $flashBag = $this->getSession()->getFlashBag();

        foreach ($flashBag->get($value) as $message) {
            $message = $this->getTranslator()->trans($message, [], $domain);
            $flashBag->add($type, $message);
        }
    }
protected function rename ( $ type , $ value , $ domain ) { $ flashBag = $ this -> getSession ( ) -> getFlashBag ( ) ; foreach ( $ flashBag -> get ( $ value ) as $ message ) { $ message = $ this -> getTranslator ( ) -> trans ( $ message , [ ] , $ domain ) ; $ flashBag -> add ( $ type , $ message ) ; } }
Process flash message type rename.

@param string $type   Sonata core flash message type
@param string $value  Original flash message type
@param string $domain Translation domain to use
Process flash message type rename .