• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/entitypreset.php
  • Класс: Bitrix\Crm\EntityPreset
  • Вызов: EntityPreset::getCountriesInfo
static function getCountriesInfo()
{
	if (self::$countryInfo === null)
	{
		$countryInfo = array();

		if (self::$countryCodes === null)
		{
			include($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/countries.php");
			/** @var array $arCounries */
			self::$countryCodes = array_flip($arCounries);
		}

		foreach (self::getCountryList() as $id => $title)
		{
			$countryInfo[$id] = array(
				'CODE' => isset(self::$countryCodes[$id]) ? self::$countryCodes[$id] : '',
				'TITLE' => $title
			);
		}

		self::$countryInfo = $countryInfo;
	}

	return self::$countryInfo;
}