/** * Returns the list of currency symbols * @see getCurrencyList() * @return array( currencyId => currencySymbol ) */ public function getCurrencySymbols() { $currencies = MetricsFormatter::getCurrencyList(); return array_map(function ($a) { return $a[0]; }, $currencies); }
/** * Returns the currency symbol for a site. * * @param int $idSite The ID of the site to return the currency symbol for. * @return string eg, `'$'`. */ public static function getCurrencySymbol($idSite) { $symbols = MetricsFormatter::getCurrencyList(); $site = new Site($idSite); $currency = $site->getCurrency(); if (isset($symbols[$currency])) { return $symbols[$currency][0]; } return ''; }