• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/automation/connectors/itemrelations.php
  • Класс: Bitrix\Crm\Automation\Connectors\ItemRelations
  • Вызов: ItemRelations::getParentElementIdentifiers
public function getParentElementIdentifiers(?int $parentTypeId = null): array
{
	if ($parentTypeId === $this->item->getEntityTypeId())
	{
		return [];
	}

	if (isset($parentTypeId))
	{
		/**
		 * Constructor doesn't throw exceptions due to above check
		 *
		 * @noinspection PhpUnhandledExceptionInspection
		 */
		return
			$this
				->relationManager
				->getRelation(new RelationIdentifier($parentTypeId, $this->item->getEntityTypeId()))
				->getParentElements($this->item)
		;
	}
	else
	{
		return $this->relationManager->getParentElements($this->item);
	}
}