Пример #1
0
 public function load(ObjectManager $manager)
 {
     $categorie = $manager->getRepository('SdzBlogBundle:Categorie')->findOneBy(array('nom' => 'Developpement'));
     // Ecoles
     $ecole1 = new Ecole();
     $ecole1->setNom('Université Bordeaux 1');
     $ecole1->setDescription('Université des sciences et technologies');
     $ecole1->setNumero(341);
     $ecole1->setAdresse('avenue de la libération');
     $ecole1->setCodePostal(33140);
     $ecole1->setVille('Talence');
     $ecole1->setPublication(true);
     $ecole1->setDateEntree(new \Datetime());
     $ecole1->setDateSortie(new \Datetime());
     $ecole2 = new Ecole();
     $ecole2->setNom('Université Aix-Marseille II');
     $ecole2->setDescription('Université des sciences et technologies');
     $ecole2->setNumero(92);
     $ecole2->setAdresse('avenue de Luminy');
     $ecole2->setCodePostal(13443);
     $ecole2->setVille('Marseille');
     $ecole2->setPublication(true);
     $ecole2->setDateEntree(new \Datetime());
     $ecole3 = new Ecole();
     $ecole3->setNom('Université De Province');
     $ecole3->setDescription('Université des sciences et technologies');
     $ecole3->setNumero(13);
     $ecole3->setAdresse('avenue Charles de Gaulle');
     $ecole3->setCodePostal(13000);
     $ecole3->setVille('Marseille');
     $ecole3->setPublication(true);
     $ecole3->setDateEntree(new \Datetime());
     $ecole3->setDateSortie(new \Datetime());
     // Formations
     $fomation1 = new Formation();
     $fomation1->setDiplome('Master 2 Génie logiciel');
     $fomation1->setDateDebut(new \Datetime());
     $fomation1->setDateFin(new \Datetime());
     $fomation1->addEcole($ecole1);
     $fomation1->setDescription('Analyse et Développement');
     $fomation1->setPublication(true);
     $fomation2 = new Formation();
     $fomation2->setDiplome('Master 1 Génie logiciel');
     $fomation2->setDateDebut(new \Datetime());
     $fomation2->setDateFin(new \Datetime());
     $fomation2->addEcole($ecole2);
     $fomation2->setDescription('Analyse et Développement');
     $fomation2->setPublication(true);
     $fomation3 = new Formation();
     $fomation3->setDiplome('Licence 3 Informatique');
     $fomation3->setDateDebut(new \Datetime());
     $fomation3->addEcole($ecole3);
     $fomation3->setDateFin(new \Datetime());
     $fomation3->setDescription('Analyse et Développement');
     $fomation3->setPublication(true);
     // Competences
     $git = new Techno();
     $git->setNom('Git');
     $git->setDescription('Outils de gestion de configuration');
     $git->setCategorie($categorie);
     $git->setPublication(true);
     $fomation1->addTechno($git);
     $rMq = new Techno();
     $rMq->setNom('RabbitMq');
     $rMq->setDescription('Système de gestion de bases de données');
     $rMq->setCategorie($categorie);
     $rMq->setPublication(true);
     $fomation1->addTechno($rMq);
     $mvn = new Techno();
     $mvn->setNom('Maven');
     $mvn->setDescription('Outils de gestion de configuration');
     $mvn->setCategorie($categorie);
     $mvn->setPublication(true);
     $fomation2->addTechno($mvn);
     $php = new Techno();
     $php->setNom('PHP');
     $php->setDescription('Système de gestion de bases de données');
     $php->setCategorie($categorie);
     $php->setPublication(true);
     $fomation3->addTechno($php);
     $android = new Techno();
     $android->setNom('Android');
     $android->setDescription('Langage de programmation orientée objet.');
     $android->setCategorie($categorie);
     $android->setPublication(true);
     $fomation3->addTechno($android);
     // On déclenche l'enregistrement
     $manager->persist($fomation1);
     $manager->persist($fomation2);
     $manager->persist($fomation3);
     $manager->flush();
 }
Пример #2
0
 public function load(ObjectManager $manager)
 {
     // Mots  clés
     $javaMotCle1 = new MotCle();
     $javaMotCle1->setMotCle('listener');
     $javaMotCle2 = new MotCle();
     $javaMotCle2->setMotCle('layout');
     $svnMotCle = new MotCle();
     $svnMotCle->setMotCle('gestion de conf');
     $mySqlMotCle1 = new MotCle();
     $mySqlMotCle1->setMotCle('SGBD');
     $mySqlMotCle2 = new MotCle();
     $mySqlMotCle2->setMotCle('SQL');
     // Competences
     $svn = new Techno();
     $svn->setNom('SVN');
     $svn->setDescription('Outils de gestion de configuration');
     //$svn->setCategorie('Developpement');
     $svn->addMotCle($svnMotCle);
     $svn->setPublication(true);
     $svn->setLevel(0);
     $mySql = new Techno();
     $mySql->setNom('MySQL');
     $mySql->setDescription('Système de gestion de bases de données');
     //$mySql->setCategorie('Developpement');
     $mySql->addMotCle($mySqlMotCle1);
     $mySql->addMotCle($mySqlMotCle2);
     $mySql->setLevel(0);
     $java = new Techno();
     $java->setNom('Java');
     $java->setDescription('Langage de programmation orientée objet.');
     //$mySql->setCategorie('Developpement');
     $java->addMotCle($javaMotCle1);
     $java->addMotCle($javaMotCle2);
     $java->setPublication(true);
     $java->setLevel(0);
     // Societes
     $societe1 = new Societe();
     $societe1->setNom('France Télécom');
     $societe1->setActivite('Télécommunication');
     $societe1->setPublication(true);
     $societe1->setDateEntree(new \Datetime());
     $societe2 = new Societe();
     $societe2->setNom('Air Bus');
     $societe2->setActivite('Avionique');
     $societe2->setDateEntree(new \Datetime());
     $societe2->setDateSortie(new \Datetime());
     // Tâches
     $tache1 = new Tache();
     $tache1->setDescription('Analyse du cahier des charges');
     $tache2 = new Tache();
     $tache2->setDescription('Gestion de version via SVN');
     $tache3 = new Tache();
     $tache3->setDescription('Analyse du cahier des charges');
     $tache4 = new Tache();
     $tache4->setDescription('Gestion de version via SVN');
     // Experiences
     $experience1 = new Experience();
     $experience1->setPoste('Ingénieur d\'études et développement');
     $experience1->setProjet('XGLUE');
     $experience1->setDescription('Application de Xchecking');
     $experience1->setLieu('Blagnac');
     $experience1->setSociete($societe1);
     $experience1->addTechno($java);
     $experience1->addTechno($mySql);
     $experience1->setDateDebut(new \Datetime());
     $experience1->addTache($tache1);
     $experience1->addTache($tache2);
     $experience1->setPublication(true);
     $experience2 = new Experience();
     $experience2->setPoste('Ingénieur d\'études et développement');
     $experience2->setProjet('VODOI');
     $experience2->setLieu('Blagnac');
     $experience2->setDescription('Application 2424Video');
     $experience2->setSociete($societe2);
     $experience2->addTechno($java);
     $experience2->addTechno($svn);
     $experience2->setDateDebut(new \Datetime());
     $experience2->addTache($tache3);
     $experience2->addTache($tache4);
     $experience1->setPublication(true);
     // On déclenche l'enregistrement
     $manager->persist($experience1);
     $manager->persist($experience2);
     $manager->flush();
 }