Ejemplo n.º 1
0
 public function load(ObjectManager $manager)
 {
     $names = array("PHP", "Symfony2", "C++", "Java", "Photoshop", "Blender", "Bloc-Notes");
     foreach ($names as $name) {
         $skill = new Skill();
         $skill->setName($name);
         $manager->persist($skill);
     }
     $manager->flush();
 }
Ejemplo n.º 2
0
 public function load(ObjectManager $manager)
 {
     $names = ['PHP', 'Symfony2', 'C++', 'Java', 'Photoshop', 'Blender', 'Notepad++'];
     foreach ($names as $name) {
         $skill = new Skill();
         $skill->setName($name);
         $manager->persist($skill);
     }
     $manager->flush();
 }
Ejemplo n.º 3
0
 public function load(ObjectManager $manager)
 {
     $names = array('PHP', 'Mysql', 'Javascript', 'Java');
     foreach ($names as $name) {
         $skill = new Skill();
         $skill->setName($name);
         $manager->persist($skill);
     }
     $manager->flush();
 }
Ejemplo n.º 4
0
 public function load(ObjectManager $manager)
 {
     // Liste des noms de compétences à ajouter
     $names = array('PHP', 'Symfony2', 'C++', 'Java', 'Photoshop', 'Blender', 'Bloc-note');
     foreach ($names as $name) {
         // On crée la compétence
         $skill = new Skill();
         $skill->setName($name);
         // On la persiste
         $manager->persist($skill);
     }
     // On déclenche l'enregistrement de toutes les catégories
     $manager->flush();
 }