• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/controller/enum.php
  • Класс: Bitrix\Crm\Controller\Enum
  • Вызов: Enum::getOrderOwnerTypesAction
public function getOrderOwnerTypesAction(): array
{
	$paymentDependantEntityTypeIds = [];

	$relationManager = \Bitrix\Crm\Service\Container::getInstance()->getRelationManager();
	$orderParentRelations = $relationManager->getParentRelations(\CCrmOwnerType::Order);
	foreach ($orderParentRelations as $relation)
	{
		$parentEntityTypeId = $relation->getParentEntityTypeId();
		$factory = \Bitrix\Crm\Service\Container::getInstance()->getFactory($parentEntityTypeId);
		if ($factory && $factory->isPaymentsEnabled())
		{
			$paymentDependantEntityTypeIds[] = [
				'ID' => $factory->getEntityTypeId(),
				'CODE' => \CCrmOwnerType::ResolveName($factory->getEntityTypeId()),
				'NAME' => \CCrmOwnerType::GetDescription($factory->getEntityTypeId()),
				'ATTRIBUTE'=> Attributes::DYNAMIC
			];
		}
	}

	return $paymentDependantEntityTypeIds;
}