Exemplo n.º 1
0
 public function addMicropetitionRootComment(Micropetition $micropetition)
 {
     $comment = new MicropetitionComment();
     $comment->setPetition($micropetition);
     $comment->setCommentBody($micropetition->getPetitionBody());
     $comment->setUser($micropetition->getUser());
     return $this->saveNewComment($comment);
 }
Exemplo n.º 2
0
 public function load(ObjectManager $manager)
 {
     $firstComment = new Comment();
     $firstComment->setCommentBody('comment');
     $firstComment->setParentComment(null);
     $firstComment->setPetition($this->getReference('petition1'));
     $this->addReference('commentPetition1', $firstComment);
     $manager->persist($firstComment);
     $manager->flush();
 }
 public function setCommentBody($commentBody)
 {
     $this->__load();
     return parent::setCommentBody($commentBody);
 }