예제 #1
0
 public function submitaddcommentAction(Request $request)
 {
     $comments = new comments();
     $em = $this->getDoctrine()->getManager();
     $authorname = $request->request->get('authorname');
     $authoremail = $request->request->get('authoremail');
     $authorurl = $request->request->get('authorurl');
     $description = $request->request->get('description');
     $article_id = $request->request->get('article_id');
     $comments->setAuthorName($authorname);
     $comments->setAuthorEmail($authoremail);
     $comments->setAuthorUrl($authorurl);
     $comments->setDescription($description);
     $comments->setArticleId($article_id);
     $em->persist($comments);
     $em->flush();
     return $this->redirectToRoute('mainblogdescription', array('articleid' => $article_id));
 }
 /**
  * {@inheritDoc}
  */
 public function setDescription($description)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setDescription', array($description));
     return parent::setDescription($description);
 }