コード例 #1
0
 public function up(Schema $schema)
 {
     $eye = new EyeColor();
     $eye->setName($this->value);
     $this->em->persist($eye);
     $hair = new HairColor();
     $hair->setName($this->value);
     $this->em->persist($hair);
     $smoking = new Smoking();
     $smoking->setName($this->value);
     $this->em->persist($smoking);
     $drinking = new Drinking();
     $drinking->setName($this->value);
     $this->em->persist($drinking);
     $income = new Income();
     $income->setName($this->value);
     $this->em->persist($income);
     $education = new Education();
     $education->setName($this->value);
     $this->em->persist($education);
     $profession = new Profession();
     $profession->setName($this->value);
     $this->em->persist($profession);
     $haveChildren = new HaveChildren();
     $haveChildren->setName($this->value);
     $this->em->persist($haveChildren);
     $livesWithChildren = new LivesWithChildren();
     $livesWithChildren->setName($this->value);
     $this->em->persist($livesWithChildren);
     $religion = new Religion();
     $religion->setName($this->value);
     $religion->setPriority(1);
     $this->em->persist($religion);
     $ethnicity = new Ethnicity();
     $ethnicity->setName($this->value);
     $this->em->persist($ethnicity);
     $zodiac = new Zodiac();
     $zodiac->setName($this->value);
     $this->em->persist($zodiac);
     $language = new Language(68, 'Romanian');
     $language->setCode('RO');
     $this->em->persist($language);
     $this->em->flush();
 }
 /**
  * {@inheritDoc}
  */
 public function setName($name)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setName', array($name));
     return parent::setName($name);
 }