/**
  * {@inheritDoc}
  */
 public function load(ObjectManager $manager)
 {
     $a1 = new Author();
     $a1->setName('David');
     $a2 = new Author();
     $a2->setName('Eddie');
     $a3 = new Author();
     $a3->setName('Elsa');
     $manager->persist($a1);
     $manager->persist($a2);
     $manager->persist($a3);
     $manager->flush();
 }
 /**
  * {@inheritdoc}
  */
 public function load(ObjectManager $manager)
 {
     $a1 = new Author();
     $a1->setName("Vlad");
     $a2 = new Author();
     $a2->setName("Nikolay");
     $a3 = new Author();
     $a3->setName("Edgar");
     $manager->persist($a1);
     $manager->persist($a2);
     $manager->persist($a3);
     $manager->flush();
 }
Example #3
0
 /**
  * {@inheritDoc}
  **/
 public function load(ObjectManager $manager)
 {
     $auth1 = new Author();
     $auth1->setName('Gary');
     $auth2 = new Author();
     $auth2->setName('Paula');
     $auth3 = new Author();
     $auth3->setName('Freddie');
     $auth4 = new Author();
     $auth4->setName('Daisy');
     $manager->persist($auth1);
     $manager->persist($auth2);
     $manager->persist($auth3);
     $manager->persist($auth4);
     $manager->flush();
 }
Example #4
0
 /**
  *
  * {@inheritdoc}
  */
 public function load(ObjectManager $manager)
 {
     $faker = FakerFactory::create('ru_RU');
     for ($i = 1; $i < 4; $i++) {
         $a = new Author();
         $faker->seed(1110 + $i);
         $a->setName($faker->firstName);
         $a->setUsername($faker->userName);
         $a->setPlainPassword($faker->userName);
         $a->setEnabled(TRUE);
         $a->setEmail($faker->userName . '@example.ru');
         $a->setRoles(array('ROLE_USER'));
         $manager->persist($a);
     }
     $a0 = new Author();
     $a0->setUsername('admin');
     $a0->setPlainPassword('adminpass');
     $a0->setEnabled(TRUE);
     $a0->setEmail('*****@*****.**');
     $a0->setRoles(array('ROLE_ADMIN'));
     $a0->setName($faker->firstName);
     $manager->persist($a0);
     $manager->flush();
 }