• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integrity/duplicatebankdetailcriterion.php
  • Класс: Bitrix\Crm\Integrity\DuplicateBankDetailCriterion
  • Вызов: DuplicateBankDetailCriterion::registerByParent
static function registerByParent($entityTypeId, $entityId)
{
	if(!is_int($entityTypeId))
	{
		throw new Main\ArgumentTypeException('entityTypeId', 'integer');
	}

	if(!is_int($entityId))
	{
		throw new Main\ArgumentTypeException('entityId', 'integer');
	}

	if ($entityTypeId === \CCrmOwnerType::Requisite && $entityId > 0)
	{
		$entityInfo = self::getRequisite()->getOwnerEntityById($entityId);
		if (\CCrmOwnerType::IsDefined($entityInfo['ENTITY_TYPE_ID']) && $entityInfo['ENTITY_ID'] > 0)
		{
			self::registerByEntity($entityInfo['ENTITY_TYPE_ID'], $entityInfo['ENTITY_ID']);
		}
	}
}