Beispiel #1
0
 /**
  * Load fixtures.
  *
  * @param \Doctrine\Common\Persistence\ObjectManager $manager
  */
 public function load(ObjectManager $manager)
 {
     $manager->clear();
     $org = $manager->getRepository('TruckeeMatchBundle:Organization')->findOneBy(array('orgName' => 'Glenshire Marmot Fund'));
     $skill = $manager->getRepository('TruckeeMatchBundle:Skill')->findOneBy(array('skill' => 'Administrative Support'));
     $opp = new Opportunity();
     $opp->setOppName('Feeder');
     $opp->setDescription("Make sure the critters don't go hungry");
     $opp->setActive(true);
     $opp->setExpireDate(date_add(new \DateTime(), new \DateInterval('P1M')));
     $opp->setOrganization($org);
     $opp->addSkill($skill);
     $opp->setAddDate(new \DateTime());
     $opp->setLastupdate(new \DateTime());
     $manager->persist($opp);
     $manager->flush();
 }
 /**
  * Load fixtures.
  *
  * @param \Doctrine\Common\Persistence\ObjectManager $manager
  */
 public function load(ObjectManager $manager)
 {
     $manager->clear();
     $org = $manager->getRepository('TruckeeMatchBundle:Organization')->findOneBy(array('orgName' => 'Turkeys R Us'));
     $skill = $manager->getRepository('TruckeeMatchBundle:Skill')->findOneBy(array('skill' => 'Administrative Support'));
     $opp = new Opportunity();
     $opp->setOppName('Defeatherer');
     $opp->setDescription('Take the fuzzy stuff off!');
     $opp->setActive(true);
     $opp->setExpireDate(date_add(new \DateTime(), new \DateInterval('P1M')));
     $opp->setOrganization($org);
     $opp->addSkill($skill);
     $opp->setAddDate(new \DateTime());
     $opp->setLastupdate(new \DateTime());
     $manager->persist($opp);
     $manager->flush();
 }