You are here

function _country_field_countries in Country Field 7

Provides a list of countries.

Return value

array Associative array keyed by country code and having the country name as values.

3 calls to _country_field_countries()
country_field_countries in ./country_field.module
Returns a list of countries.
country_field_field_instance_settings_form in ./country_field.module
Implements hook_field_instance_settings_form().
views_handler_filter_country_field::get_value_options in views/views_handler_filter_country_field.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

./country_field.module, line 98
Contains field hook implementations for a country select field.

Code

function _country_field_countries() {
  static $countries;
  if (!isset($countries)) {
    require_once DRUPAL_ROOT . '/includes/locale.inc';
    $countries = country_get_list();
  }
  return $countries;
}