You are here

function currency_api_get_list in Currency 7

Same name and namespace in other branches
  1. 5 currency_api/currency_api.module \currency_api_get_list()
  2. 6 currency_api/currency_api.module \currency_api_get_list()

Returns an array of all currency names.

5 calls to currency_api_get_list()
currency_api_get_desc in currency_api/currency_api.module
Currency exchange API function.
currency_form in ./currency.module
Currency exchange form.
currency_handler_argument_currency::title in includes/views/handlers/currency_handler_argument_currency.inc
Get the title this argument will assign the view, given the argument.
currency_handler_field_currency::render in includes/views/handlers/currency_handler_field_currency.inc
Render the field.
currency_handler_filter_currency::get_value_options in includes/views/handlers/currency_handler_filter_currency.inc
Child classes should be used to override this function and set the 'value options', unless 'options callback' is defined as a valid function or static public method to generate these values.

File

currency_api/currency_api.module, line 277
This module provides an API for currency conversion.

Code

function currency_api_get_list() {
  static $list;
  if (!isset($list)) {
    $currencies = currency_api_get_currencies();
    $list = array();
    foreach ($currencies as $code => $currency) {
      $list[$code] = $currency['name'];
    }
  }
  return $list;
}