Beispiel #1
0
 public function load(ObjectManager $em)
 {
     $android = new Category();
     $android->setName('Android');
     $security = new Category();
     $security->setName('Security');
     $ios = new Category();
     $ios->setName('IOS');
     $wp = new Category();
     $wp->setName('Windows-Phone');
     $em->persist($android);
     $em->persist($security);
     $em->persist($ios);
     $em->persist($wp);
     $em->flush();
     $this->addReference('category-android', $android);
     $this->addReference('category-security', $security);
     $this->addReference('category-ios', $ios);
     $this->addReference('category-windowsPhone', $wp);
 }