Exemple #1
0
 public function migrateHonour($person, $honourOrder, $label, $country = null, $territory = null, $location = null, $fromDate = null, $toDate = null, $provenDate = null, $comment = null)
 {
     //insert into new data
     $newHonour = new Honour();
     $newHonour->setPerson($person);
     $newHonour->setHonourOrder($honourOrder);
     $newHonour->setLabel($this->normalize($label));
     $newHonour->setCountry($this->getCountry($country));
     $newHonour->setTerritory($this->getTerritory($territory, $location));
     $newHonour->setLocation($this->getLocation($location));
     $newHonour->setFromDate($this->getDate($fromDate));
     $newHonour->setToDate($this->getDate($toDate));
     $newHonour->setProvenDate($this->getDate($provenDate));
     $newHonour->setComment($this->normalize($comment));
     $this->getDBManager()->persist($newHonour);
     $this->getDBManager()->flush();
 }