• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/binding/entitybinding.php
  • Класс: Bitrix\Crm\Binding\EntityBinding
  • Вызов: EntityBinding::removeEntityBinding
static function removeEntityBinding($entityTypeID, $entityID, array &$bindings)
{
	if(!is_int($entityTypeID))
	{
		$entityTypeID = (int)$entityTypeID;
	}

	if(!\CCrmOwnerType::IsDefined($entityTypeID))
	{
		throw new Main\ArgumentOutOfRangeException('entityTypeID',
			\CCrmOwnerType::FirstOwnerType,
			\CCrmOwnerType::LastOwnerType
		);
	}

	$index = self::findBindingIndexByEntityID($entityTypeID, $entityID, $bindings);
	if($index >= 0)
	{
		unset($bindings[$index]);
		$bindings = array_values($bindings);
	}
}