Exemplo n.º 1
0
 public function loadIdioms($manager)
 {
     $topic = new VocTopic();
     $topic->setName('Smart Idioms');
     $manager->persist($topic);
     $manager->flush();
     $ex = new ExerciceMatch();
     $ex->setTopic($topic);
     $author = $this->getReference('user.super_admin');
     $ex->setAuthor($author);
     $manager->persist($ex);
     $manager->flush();
     $word = new MatchWord();
     $word->setStart('A penny for');
     $word->setEnd('your thoughts');
     $word->setExercice($ex);
     $manager->persist($word);
     $manager->flush();
     $word = new MatchWord();
     $word->setStart('Actions speak ');
     $word->setEnd('louder than words');
     $word->setExercice($ex);
     $manager->persist($word);
     $manager->flush();
     $word = new MatchWord();
     $word->setStart('Costs an arm');
     $word->setEnd('and a leg');
     $word->setExercice($ex);
     $manager->persist($word);
     $manager->flush();
 }
Exemplo n.º 2
0
 public function load(ObjectManager $manager)
 {
     $topic = new VocTopic();
     $topic->setName('à table');
     $manager->persist($topic);
     $manager->flush();
     $this->loadCooking($manager, $topic);
     //computer
     $topic = new VocTopic();
     $topic->setName('Computer');
     $manager->persist($topic);
     $manager->flush();
     $this->loadComputer($manager, $topic);
     //robots
     $topic = new VocTopic();
     $topic->setName('Robots');
     $manager->persist($topic);
     $manager->flush();
     $this->loadRobot($manager, $topic);
 }