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 setParentComment(\Civix\CoreBundle\Entity\BaseComment $parentComment = NULL) { $this->__load(); return parent::setParentComment($parentComment); }