public function load(ObjectManager $manager) { $representative = $this->getReference('representative1'); $question = new RepresentativeQuestion(); $question->setUser($representative); $question->setSubject('test'); $this->addReference('representativeQuestion1', $question); $manager->persist($question); $manager->flush(); }
public function setUser(\Civix\CoreBundle\Entity\Representative $user = NULL) { $this->__load(); return parent::setUser($user); }