Example #1
0
 public function migrateRank($person, $rankOrder, $label, $class = null, $country = null, $territory = null, $location = null, $fromDate = null, $toDate = null, $provenDate = null, $comment = null)
 {
     //insert into new data
     $newRank = new Rank();
     $newRank->setPerson($person);
     $newRank->setRankOrder($rankOrder);
     $newRank->setLabel($this->normalize($label));
     $newRank->setClass($this->normalize($class));
     $newRank->setCountry($this->getCountry($country));
     $newRank->setTerritory($this->getTerritory($territory, $location));
     $newRank->setLocation($this->getLocation($location));
     $newRank->setFromDate($this->getDate($fromDate));
     $newRank->setToDate($this->getDate($toDate));
     $newRank->setProvenDate($this->getDate($provenDate));
     $newRank->setComment($this->normalize($comment));
     $this->getDBManager()->persist($newRank);
     $this->getDBManager()->flush();
 }