Ejemplo n.º 1
0
 public function migrateRoadOfLife($person, $roadOfLifeOrder, $originCountry = null, $originTerritory = null, $job = null, $country = null, $territory = null, $location = null, $fromDate = null, $toDate = null, $provenDate = null, $comment = null)
 {
     //insert into new data
     $newRoadOfLife = new RoadOfLife();
     $newRoadOfLife->setPerson($person);
     $newRoadOfLife->setRoadOfLifeOrder($roadOfLifeOrder);
     $newRoadOfLife->setOriginCountry($this->getCountry($originCountry));
     $newRoadOfLife->setOriginTerritory($this->getTerritory($originTerritory));
     $newRoadOfLife->setJob($this->getJob($job));
     $newRoadOfLife->setCountry($this->getCountry($country));
     $newRoadOfLife->setTerritory($this->getTerritory($territory, $location));
     $newRoadOfLife->setLocation($this->getLocation($location));
     $newRoadOfLife->setFromDate($this->getDate($fromDate));
     $newRoadOfLife->setToDate($this->getDate($toDate));
     $newRoadOfLife->setProvenDate($this->getDate($provenDate));
     $newRoadOfLife->setComment($this->normalize($comment));
     $this->getDBManager()->persist($newRoadOfLife);
     $this->getDBManager()->flush();
 }