• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/recycling/storedocumentbinder.php
  • Класс: Bitrix\Crm\Recycling\StoreDocumentBinder
  • Вызов: StoreDocumentBinder::bindEntities
public function bindEntities($associatedEntityTypeID, $associatedEntityID, array $entityIDs)
{
	if (in_array($associatedEntityTypeID, [\CCrmOwnerType::Contact, \CCrmOwnerType::Company]))
	{
		(new Crm\Integration\Catalog\Contractor\StoreDocumentContactCompanyBinding($associatedEntityTypeID))
			->bindToDocuments($associatedEntityID, $entityIDs);
	}
	else
	{
		$entityTypeName = \CCrmOwnerType::ResolveName($associatedEntityTypeID);
		throw new Main\NotSupportedException("Entity '{$entityTypeName}' not supported in current context.");
	}
}