• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/merger/conflictresolver/namefield.php
  • Класс: Bitrix\Crm\Merger\ConflictResolver\NameField
  • Вызов: NameField::doResolve
protected function doResolve(): bool
{
	if (count($this->seeds) > static::MAX_SEED_TO_CHECK_COUNT)
	{
		// if seeds count is too large, will use only StringField resolves:
		$this->skipResolve = true;
		return parent::doResolve();
	}

	$this->skipSetNewTarget = true; // will only check, modifying seeds data is forbidden
	foreach (array_keys($this->seeds) as $targetId)
	{
		$this->curSeedId = $targetId;
		$targetValue = $this->getSeedValue();
		foreach (array_keys($this->seeds) as $seedId)
		{
			if ($seedId === $targetId)
			{
				continue;
			}
			$this->curSeedId = $seedId;
			$seedValue = $this->getSeedValue();

			if (!$this->resolveByValue($seedValue, $targetValue))
			{
				return false;
			}
		}
	}
	$this->skipSetNewTarget = false;
	$this->curSeedId = null;

	return parent::doResolve();
}