Symfony 2.1 app.session.flashbag.get («что-то») возвращает пустое значение

У меня проблемы с использованием app.session.flashbag.get('notice') .

В контроллере я делаю

 public function updateAction(Request $request, $id) { $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('SomeBundle:SomeEntity')->find($id); $editForm = $this->createForm(new SomeEntityType(), $entity); $editForm->bind($request); if ($editForm->isValid()) { $em->persist($entity); $em->flush(); $flash = $this->get('translator')->trans('Some Entity was successfully updated'); $this->get('session')->getFlashBag()->add('notice', $flash); return $this->redirect($this->generateUrl('some_entity_edit', array('id' => $id))); } 

В editAction я получаю информацию из сеанса:

 public function editAction($id) { $em = $this->getDoctrine()->getManager(); $flashes = $this->get('session')->getFlashBag()->get('notice', array()); //... //... return array( 'entity' => $entity, 'edit_form' => $editForm->createView(), 'flashes' => $flashes ); } 

И я пытаюсь в TWIG получить информацию из сессии:

 TWIG: {% for flashMessage in app.session.flashbag.get('notice') %}{{ flashMessage }}{% endfor %} PHP: {% for flashMessage2 in flashes %}{{ flashMessage2 }}{% endfor %} 

Приложение app.session.flashbag.get ('notice') пуст, значения вспышек имеют значение.

У вас есть какие-то идеи, почему я не могу получить данные из app.session.flashbag.get ('notice')?