• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/tracking/ui/details.php
  • Класс: Bitrix\Crm\Tracking\UI\Details
  • Вызов: Details::prepareEntityData
static function prepareEntityData($entityTypeId, $entityId, array &$data, bool $isRequired = false)
{
	ob_start();
	/** @var \CALLMain {$GLOBALS['APPLICATION']} */
	$componentResult = $GLOBALS['APPLICATION']->includeComponent(
		'bitrix:crm.tracking.entity.details',
		'view',
		[
			'SHOW_FIELD' => true,
			'ENTITY_TYPE_ID' => $entityTypeId,
			'ENTITY_ID' => $entityId,
			'SOURCE_INPUT_NAME' => self::SourceId,
		]
	);
	$data[self::SourceId . '_VIEW_HTML'] = ob_get_clean();

	ob_start();
	/** @var \CALLMain {$GLOBALS['APPLICATION']} */
	$componentResult = $GLOBALS['APPLICATION']->includeComponent(
		'bitrix:crm.tracking.entity.details',
		'edit',
		[
			'SHOW_FIELD' => true,
			'ENTITY_TYPE_ID' => $entityTypeId,
			'ENTITY_ID' => $entityId,
			'SOURCE_INPUT_NAME' => self::SourceId,
			'IS_REQUIRED' => $isRequired,
		]
	);
	$data[self::SourceId . '_EDIT_HTML'] = ob_get_clean();
	$data[self::SourceId] = (is_array($componentResult) && isset($componentResult['SELECTED_SOURCE_ID'])) ?
		$componentResult['SELECTED_SOURCE_ID'] : null;
}