public function load(ObjectManager $manager) { $representative = new Representative(); $representative->setFirstName('Joseph'); $representative->setLastName('Biden'); $representative->setUsername('JosephBiden'); $representative->setOfficialTitle('Vice President'); $representative->setCity('Washington'); $representative->setOfficialAddress('1600 Pennsylvania Avenue NW'); $representative->setOfficialPhone(''); $representative->setEmail('*****@*****.**'); $representative->setDistrict($this->getReference('district_us')); $representative->setRepresentativeStorage($this->getReference('vice_president')); $this->addReference('vice_president_representative', $representative); $manager->persist($representative); $manager->flush($representative); }
public function setRepresentativeStorage(\Civix\CoreBundle\Entity\RepresentativeStorage $representativeStorage = NULL) { $this->__load(); return parent::setRepresentativeStorage($representativeStorage); }