function country_field_countries in Country Field 7
Returns a list of countries.
1 call to country_field_countries()
- country_field_options_list in ./
country_field.module - Implements hook_options_list().
1 string reference to 'country_field_countries'
- country_field_field_info in ./
country_field.module - Implements hook_field_info().
File
- ./
country_field.module, line 80 - Contains field hook implementations for a country select field.
Code
function country_field_countries($field, $instance, $entity_type, $entity, &$cacheable) {
$cacheable = TRUE;
$countries = _country_field_countries();
if (!empty($instance['settings']['countries'])) {
$countries = array_intersect_key($countries, drupal_map_assoc($instance['settings']['countries']));
}
return $countries;
}