• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Relation/StorageStrategy/EntityToOrder.php
  • Класс: Bitrix\Crm\Relation\StorageStrategy\EntityToOrder
  • Вызов: EntityToOrder::areItemsBound
public function areItemsBound(ItemIdentifier $parent, ItemIdentifier $child): bool
{
	/** @var Order|null $order */
	$order = Order::load($child->getEntityId());
	if (!$order)
	{
		return false;
	}

	$binding = $order->getEntityBinding();
	if (
		!$binding
		|| $binding->getOwnerTypeId() !== $parent->getEntityTypeId()
	)
	{
		return false;
	}

	return $parent->getEntityId() === $binding->getOwnerId();
}