public function migrateStatus($person, $statusOrder, $label, $country = null, $territory = null, $location = null, $fromDate = null, $toDate = null, $provenDate = null, $comment = null) { //insert into new data $newStatus = new Status(); $newStatus->setPerson($person); $newStatus->setStatusOrder($statusOrder); $newStatus->setLabel($this->normalize($label)); $newStatus->setCountry($this->getCountry($country)); $newStatus->setTerritory($this->getTerritory($territory, $location)); $newStatus->setLocation($this->getLocation($location)); $newStatus->setFromDate($this->getDate($fromDate)); $newStatus->setToDate($this->getDate($toDate)); $newStatus->setProvenDate($this->getDate($provenDate)); $newStatus->setComment($this->normalize($comment)); $this->getDBManager()->persist($newStatus); $this->getDBManager()->flush(); }