/** * Displays a form to edit an existing Answers entity. * * @Route("/post/{id}/answsers", requirements={"id" = "\d+"}, name="admin_post_answer_list") * @Method({"GET", "POST"}) * @Security("post.isAuthor(user)") */ public function answsersAction(Post $post, Request $request) { $em = $this->getDoctrine()->getManager(); $answers = $em->getRepository('AcmeUserBundle:Answer')->findAnswsersByPostId($post->getId()); //a mettre à jour //return $this->render('admin/blog/index.html.twig', array('posts' => $answers)); }
/** * {@inheritDoc} */ public function getId() { if ($this->__isInitialized__ === false) { return (int) parent::getId(); } $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', array()); return parent::getId(); }