Пример #1
0
 /**
  * @Route("/event/comment/delete/{id}", name="admin_event_comment_delete", requirements={"id" = "\d+"})
  * @Template()
  * @ParamConverter("Event", class="ConnectionEventBundle:EventComment")
  */
 public function deleteCommentAction(EventComment $comment)
 {
     $eventId = $comment->getEvent()->getId();
     $em = $this->getDoctrine()->getManager();
     $em->remove($comment);
     $em->flush();
     return $this->redirect($this->generateUrl('admin_event_comments_view', array('id' => $eventId)));
 }
 /**
  * {@inheritDoc}
  */
 public function getEvent()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getEvent', array());
     return parent::getEvent();
 }