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; }
public function matchingSource(\UR\DB\NewBundle\Entity\Source $sourceOne, \UR\DB\NewBundle\Entity\Source $sourceTwo, $allowLessInformation = false) { $this->LOGGER->debug("Comparing " . $sourceOne . " with " . $sourceTwo); if (!$this->compareStrings($sourceOne->getLabel(), $sourceTwo->getLabel(), $allowLessInformation)) { return false; } if (!$this->compareStrings($sourceOne->getPlaceOfDiscovery(), $sourceTwo->getPlaceOfDiscovery(), $allowLessInformation)) { return false; } if (!$this->compareStrings($sourceOne->getRemark(), $sourceTwo->getRemark(), $allowLessInformation)) { return false; } return true; }