Ojs\CoreBundle\Controller\OjsController::errorFlashBag PHP Method

errorFlashBag() protected method

protected errorFlashBag ( $text ) : boolean
$text
return boolean
    protected function errorFlashBag($text)
    {
        $session = $this->get('session');
        $flashBag = $session->getFlashBag();
        $translator = $this->get('translator');
        $flashBag->add('error', $translator->trans($text));
        return true;
    }