- Модуль: iblock
- Путь к файлу: ~/bitrix/modules/iblock/lib/component/base.php
- Класс: BitrixIblockComponentBase
- Вызов: Base::getTemplateCurrencies
protected function getTemplateCurrencies()
{
$currencies = array();
if ($this->arResult['MODULES']['currency'])
{
if (isset($this->arResult['CONVERT_CURRENCY']['CURRENCY_ID']))
{
$currencyFormat = CCurrencyLang::GetFormatDescription($this->arResult['CONVERT_CURRENCY']['CURRENCY_ID']);
$currencies = array(
array(
'CURRENCY' => $this->arResult['CONVERT_CURRENCY']['CURRENCY_ID'],
'FORMAT' => array(
'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']
)
)
);
unset($currencyFormat);
}
else
{
$currencyIterator = CurrencyCurrencyTable::getList(array(
'select' => array('CURRENCY')
));
while ($currency = $currencyIterator->fetch())
{
$currencyFormat = CCurrencyLang::GetFormatDescription($currency['CURRENCY']);
$currencies[] = array(
'CURRENCY' => $currency['CURRENCY'],
'FORMAT' => array(
'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']
)
);
}
unset($currencyFormat, $currency, $currencyIterator);
}
}
return $currencies;
}