Commit 27a0f7f5 authored by ericksho-ipre's avatar ericksho-ipre

mensaje al no encontrar evento

parent 18287912
...@@ -85,6 +85,18 @@ class EventController extends Controller ...@@ -85,6 +85,18 @@ class EventController extends Controller
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$event = $em->getRepository('AppBundle:Event')->findOneByHashtag($hashtag); $event = $em->getRepository('AppBundle:Event')->findOneByHashtag($hashtag);
if(is_null($event) )
{
$this->addFlash(
'notice',
array(
'alert' => 'danger',// danger, warning, info, success
'title' => 'El evento "'.$hashtag.'"no existe: ',
'message' => 'verifique que el hashtag sea correcto y que comience con "#"'
)
);
return $this->redirectToRoute('event_find');
}
return $this->redirectToRoute('question_event', array('id' => $event->getId())); return $this->redirectToRoute('question_event', array('id' => $event->getId()));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment