You are here

function countries_apachesolr_map_callback in Countries 8

Same name and namespace in other branches
  1. 7.2 countries.module \countries_apachesolr_map_callback()

Map callback.

1 string reference to 'countries_apachesolr_map_callback'
countries_apachesolr_field_mappings in ./countries.module
Implements hook_apachesolr_field_mappings().

File

./countries.module, line 1084
Defines the field and entity information for countries.

Code

function countries_apachesolr_map_callback(array $values) {
  $map = array();
  foreach ($values as $value) {
    if ($country = country_load($value)) {
      $map[$value] = country_property($country, 'name', array(
        'sanitize' => 0,
      ));
    }
  }
  return $map;
}