AutomaticDuplicateIndexBuilder::getExistedTypes

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. AutomaticDuplicateIndexBuilder
  4. getExistedTypes
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integrity/automaticduplicateindexbuilder.php
  • Класс: Bitrix\Crm\Integrity\AutomaticDuplicateIndexBuilder
  • Вызов: AutomaticDuplicateIndexBuilder::getExistedTypes
static function getExistedTypes($entityTypeID, $userID, $scope = null)
{
	$filter = array(
		'=USER_ID' => $userID,
		'=ENTITY_TYPE_ID' => $entityTypeID
	);
	if ($scope !== null)
	{
		$filter['=SCOPE'] = $scope;
	}
	$dbResult = AutomaticDuplicateIndexTable::getList(
		array(
			'select' => array('TYPE_ID'),
			'order' => array('TYPE_ID' => 'ASC'),
			'group' => array('TYPE_ID'),
			'filter' => $filter
		)
	);

	$result = array();
	while ($fields = $dbResult->fetch())
	{
		$result[] = intval($fields['TYPE_ID']);
	}
	return $result;
}

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