This commit is contained in:
Marc Ducobu
2016-03-23 18:22:17 +01:00
7 changed files with 90 additions and 35 deletions

View File

@@ -91,21 +91,21 @@ class EventController extends Controller
* Finds and displays a Event entity.
*
*/
public function showAction($id)
public function showAction($event_id)
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('ChillEventBundle:Event')->find($id);
$entity = $em->getRepository('ChillEventBundle:Event')->find($event_id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find Event entity.');
}
$deleteForm = $this->createDeleteForm($id);
$this->denyAccessUnlessGranted('CHILL_EVENT_SEE_DETAILS', $entity,
"You are not allowed to see details on this event");
return $this->render('ChillEventBundle:Event:show.html.twig', array(
'entity' => $entity,
'delete_form' => $deleteForm->createView(),
'event' => $entity
));
}