• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/entitybankdetail.php
  • Класс: Bitrix\Crm\EntityBankDetail
  • Вызов: EntityBankDetail::getFieldsTitles
public function getFieldsTitles($countryId = 0)
{
	$result = array();

	$countryId = (int)$countryId;
	if (!static::checkCountryId($countryId))
	{
		$countryId = EntityPreset::getCurrentCountryId();
		if ($countryId <= 0)
			$countryId = 122;
	}

	$rqFields = array();
	foreach ($this->getRqFields() as $rqFieldName)
		$rqFields[$rqFieldName] = true;

	$rqFieldTitleMap = $this->getRqFieldTitleMap();

	Loc::loadMessages(Main\Application::getDocumentRoot().'/bitrix/modules/crm/lib/bankdetail.php');

	foreach (BankDetailTable::getMap() as $fieldName => $fieldInfo)
	{
		if (isset($rqFields[$fieldName]))
		{
			$title = '';
			if (isset($rqFieldTitleMap[$fieldName][$countryId]))
			{
				if (empty($rqFieldTitleMap[$fieldName][$countryId]))
					$title = $fieldName;
				else
					$title = $rqFieldTitleMap[$fieldName][$countryId];

			}
			$result[$fieldName] = $title;
		}
		else
		{
			$fieldTitle = (isset($fieldInfo['title']) && !empty($fieldInfo['title'])) ? $fieldInfo['title'] : GetMessage('CRM_BANK_DETAIL_ENTITY_'.$fieldName.'_FIELD');
			$result[$fieldName] = is_string($fieldTitle) ? $fieldTitle : '';
		}
	}

	return $result;
}