ContactToFactory::getChildElements

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. ContactToFactory
  4. getChildElements
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Relation/StorageStrategy/ContactToFactory.php
  • Класс: Bitrix\Crm\Relation\StorageStrategy\ContactToFactory
  • Вызов: ContactToFactory::getChildElements
public function getChildElements(ItemIdentifier $parent, int $childEntityTypeId): array
{
	$items = $this->childFactory->getItems([
		'select' => [Item::FIELD_NAME_ID],
		'filter' => [
			'=' . Item::FIELD_NAME_CONTACT_BINDINGS . '.CONTACT_ID' => $parent->getEntityId(),
		],
	]);

	$children = [];
	foreach ($items as $item)
	{
		$children[] = ItemIdentifier::createByItem($item);
	}

	return $children;
}

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