Пример #1
0
 public function migrateWork($person, $label, $works_order, $country = null, $location = null, $fromDate = null, $toDate = null, $territory = null, $provenDate = null, $comment = null)
 {
     //insert into new data
     $newWorks = new Works();
     $newWorks->setPerson($person);
     $newWorks->setLabel($this->normalize($label));
     $newWorks->setWorksOrder($works_order);
     $newWorks->setCountry($this->getCountry($country));
     $newWorks->setLocation($this->getLocation($location));
     $newWorks->setFromDate($this->getDate($fromDate));
     $newWorks->setToDate($this->getDate($toDate));
     $newWorks->setTerritory($this->getTerritory($territory, $location));
     $newWorks->setProvenDate($this->getDate($provenDate));
     $newWorks->setComment($this->normalize($comment));
     $this->getDBManager()->persist($newWorks);
     $this->getDBManager()->flush();
 }