public function addCommentByQuestionAnswer(Answer $answer) { $parent = $this->em->getRepository('CivixCoreBundle:Poll\\Comment')->findOneBy(array('question' => $answer->getQuestion(), 'parentComment' => null)); if ($answer->getComment()) { $comment = new Comment(); $comment->setUser($answer->getUser())->setCommentBody($answer->getComment())->setQuestion($answer->getQuestion())->setPrivacy($answer->getPrivacy())->setParentComment($parent); return $this->saveNewComment($comment); } }
public function getPrivacy() { $this->__load(); return parent::getPrivacy(); }