public function load(ObjectManager $manager)
 {
     $lesEnseignants = array(array('user_reference' => 'severine_quesque'));
     foreach ($lesEnseignants as $unEnseignant) {
         $enseignant = new Enseignant();
         $enseignant->setUser($manager->merge($this->getReference($unEnseignant['user_reference'])));
         $manager->persist($enseignant);
     }
     $manager->flush();
 }
Esempio n. 2
0
 /**
  * Remove enseignants
  *
  * @param \EasyStage\AppBundle\Entity\Enseigne $enseignants
  */
 public function removeEnseignant(\EasyStage\AppBundle\Entity\Enseigne $enseignants)
 {
     $this->enseignants->removeElement($enseignants);
 }
 /**
  * {@inheritDoc}
  */
 public function getNomComplet()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getNomComplet', []);
     return parent::getNomComplet();
 }