RebuildUserDuplicateIndexAgent::getDedupeConfig

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. RebuildUserDuplicateIndexAgent
  4. getDedupeConfig
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/agent/duplicate/automatic/rebuilduserduplicateindexagent.php
  • Класс: Bitrix\Crm\Agent\Duplicate\Automatic\RebuildUserDuplicateIndexAgent
  • Вызов: RebuildUserDuplicateIndexAgent::getDedupeConfig
protected function getDedupeConfig(int $entityTypeId, int $userId): array
{
	switch ($entityTypeId)
	{
		case \CCrmOwnerType::Lead:
			$optionsGridName = 'lead_dedupe_wizard';
			break;
		case \CCrmOwnerType::Contact:
			$optionsGridName = 'contact_dedupe_wizard';
			break;
		case \CCrmOwnerType::Company:
			$optionsGridName = 'company_dedupe_wizard';
			break;
		default:
			throw new ArgumentException('This entity is not supported', 'ENTITY_TYPE_ID');
	}

	$config = new DedupeConfig($userId);

	return $config->get($optionsGridName, $entityTypeId);
}

Добавить комментарий