• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/channel/entity/entitychannel.php
  • Класс: Bitrix\Crm\Integration\Channel\Entity\EntityChannelTable
  • Вызов: EntityChannelTable::hasBindings
static function hasBindings($entityTypeID, $entityID)
{
	if(!is_int($entityTypeID))
	{
		$entityTypeID = (int)$entityTypeID;
	}
	if($entityTypeID <= 0)
	{
		throw new Main\ArgumentException('Must be greater than zero', 'entityTypeID');
	}

	if(!is_int($entityID))
	{
		$entityID = (int)$entityID;
	}
	if($entityID <= 0)
	{
		throw new Main\ArgumentException('Must be greater than zero', 'entityID');
	}

	$result = self::getList(
		array(
			'select' => array('TYPE_ID'),
			'filter' => array('=ENTITY_TYPE_ID' => $entityTypeID, '=ENTITY_ID' => $entityID),
			'limit' => 1
		)
	);

	return is_array($result->fetch());
}