ContactCompanyToOrder::areItemsBound

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

	/** @var ContactCompanyEntity|null $client */
	$client = $order->getContactCompanyCollection()->getItemByIdentifier($parent);

	return !is_null($client);
}

Добавить комментарий