CAllCrmDeal::GetFieldCaption

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CAllCrmDeal
  4. GetFieldCaption
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_deal.php
  • Класс: \CAllCrmDeal
  • Вызов: CAllCrmDeal::GetFieldCaption
static function GetFieldCaption($fieldName)
{
	$result = GetMessage("CRM_DEAL_FIELD_{$fieldName}");
	if (!(is_string($result) && $result !== ''))
	{
		$result = GetMessage("CRM_DEAL_FIELD_{$fieldName}_MSGVER_1");
	}

	if (!(is_string($result) && $result !== '')
		&& Crm\Tracking\UI\Details::isTrackingField($fieldName))
	{
		$result = Crm\Tracking\UI\Details::getFieldCaption($fieldName);
	}
	if (
		!(is_string($result) && $result !== '')
		&& Crm\Service\ParentFieldManager::isParentFieldName($fieldName)
	)
	{
		$entityTypeId = Crm\Service\ParentFieldManager::getEntityTypeIdFromFieldName($fieldName);
		$result = \CCrmOwnerType::GetDescription($entityTypeId);
	}

	return is_string($result) ? $result : '';
}

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