CAllCrmLead::GetFieldCaption

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CAllCrmLead
  4. GetFieldCaption
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_lead.php
  • Класс: \CAllCrmLead
  • Вызов: CAllCrmLead::GetFieldCaption
static function GetFieldCaption($fieldName)
{
	if(\CCrmFieldMulti::IsSupportedType($fieldName))
	{
		return \CCrmFieldMulti::GetEntityTypeCaption($fieldName);
	}

	$result = GetMessage("CRM_LEAD_FIELD_{$fieldName}");
	if (!(is_string($result) && $result !== ''))
	{
		$result = GetMessage("CRM_LEAD_FIELD_{$fieldName}_MSGVER_1");
	}

	if (!(is_string($result) && $result !== '')
		&& Crm\Tracking\UI\Details::isTrackingField($fieldName))
	{
		$result = Crm\Tracking\UI\Details::getFieldCaption($fieldName);
	}

	if (Crm\Service\ParentFieldManager::isParentFieldName($fieldName))
	{
		$entityTypeId = Crm\Service\ParentFieldManager::getEntityTypeIdFromFieldName($fieldName);
		$result = \CCrmOwnerType::GetDescription($entityTypeId);
	}

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

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