示例#1
0
 private function mergeSourceObjects(\UR\DB\NewBundle\Entity\Source $dataMasterSource, \UR\DB\NewBundle\Entity\Source $toBeDeletedSource)
 {
     $dataMasterSource->setLabel($this->mergeStrings($dataMasterSource->getLabel(), $toBeDeletedSource->getLabel()));
     $dataMasterSource->setPlaceOfDiscovery($this->mergeStrings($dataMasterSource->getPlaceOfDiscovery(), $toBeDeletedSource->getPlaceOfDiscovery()));
     $dataMasterSource->setRemark($this->mergeStrings($dataMasterSource->getRemark(), $toBeDeletedSource->getRemark()));
     $dataMasterSource->setComment($this->mergeStrings($dataMasterSource->getComment(), $toBeDeletedSource->getComment()));
     return $dataMasterSource;
 }
示例#2
0
 public function migrateSource($person, $sourceOrder, $label, $placeOfDiscovery = null, $remark = null, $comment = null)
 {
     //insert into new data
     $newSource = new Source();
     $newSource->setPerson($person);
     $newSource->setSourceOrder($sourceOrder);
     $newSource->setLabel($this->normalize($label));
     $newSource->setPlaceOfDiscovery($this->normalize($placeOfDiscovery));
     $newSource->setRemark($this->normalize($remark));
     $newSource->setComment($this->normalize($comment));
     $this->getDBManager()->persist($newSource);
     $this->getDBManager()->flush();
 }