• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Service/EditorAdapter.php
  • Класс: Bitrix\Crm\Service\EditorAdapter
  • Вызов: EditorAdapter::getCurrencies
static function getCurrencies(): array
{
	$currencyList = [];

	if (Loader::includeModule('currency'))
	{
		$currencyIterator = CurrencyTable::getList([
			'select' => ['CURRENCY'],
		]);
		/** @var array $currency */
		while ($currency = $currencyIterator->fetch())
		{
			$currencyFormat = \CCurrencyLang::GetFormatDescription($currency['CURRENCY']);
			$currencyList[] = [
				'CURRENCY' => $currency['CURRENCY'],
				'FORMAT' => [
					'FORMAT_STRING' => $currencyFormat['FORMAT_STRING'],
					'DEC_POINT' => $currencyFormat['DEC_POINT'],
					'THOUSANDS_SEP' => $currencyFormat['THOUSANDS_SEP'],
					'DECIMALS' => $currencyFormat['DECIMALS'],
					'THOUSANDS_VARIANT' => $currencyFormat['THOUSANDS_VARIANT'],
					'HIDE_ZERO' => $currencyFormat['HIDE_ZERO'],
				],
			];
		}
	}

	return $currencyList;
}