• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/timeline/dealcontroller.php
  • Класс: Bitrix\Crm\Timeline\DealController
  • Вызов: DealController::applySettingsBaseData
protected function applySettingsBaseData(array &$data, array $base, string $caption = ''): void
{
	if (empty($base))
	{
		return;
	}

	$entityTypeId = $base['ENTITY_TYPE_ID'] ?? 0;
	$entityId = $base['ENTITY_ID'] ?? 0;
	$source = $base['SOURCE'] ?? '';
	if ($entityId > 0 && \CCrmOwnerType::IsDefined($entityTypeId))
	{
		if (!empty($caption))
		{
			$data['BASE'] = ['CAPTION' => $caption];
		}

		if (\CCrmOwnerType::TryGetEntityInfo($entityTypeId, $entityId, $baseEntityInfo, false))
		{
			$data['BASE']['ENTITY_INFO'] = $baseEntityInfo;
			if (!empty($source))
			{
				$data['BASE']['ENTITY_INFO']['SOURCE'] = $source;
			}
		}
	}
}