public function migrateEducation($person, $educationOrder, $label, $country = null, $territory = null, $location = null, $fromDate = null, $toDate = null, $provenDate = null, $graduationLabel = null, $graduationDate = null, $graduationLocation = null, $comment = null) { //insert into new data $newEducation = new Education(); $newEducation->setPerson($person); $newEducation->setEducationOrder($educationOrder); $newEducation->setLabel($this->normalize($label)); $newEducation->setCountry($this->getCountry($country)); $newEducation->setTerritory($this->getTerritory($territory, $location)); $newEducation->setLocation($this->getLocation($location)); $newEducation->setFromDate($this->getDate($fromDate)); $newEducation->setToDate($this->getDate($toDate)); $newEducation->setProvenDate($this->getDate($provenDate)); $newEducation->setGraduationLabel($this->normalize($graduationLabel)); $newEducation->setGraduationDate($this->getDate($graduationDate)); $newEducation->setGraduationLocation($this->getLocation($graduationLocation)); $newEducation->setComment($this->normalize($comment)); $this->getDBManager()->persist($newEducation); $this->getDBManager()->flush(); }