You are here

function countries_field_extra_fields in Countries 8

Same name and namespace in other branches
  1. 7.2 countries.module \countries_field_extra_fields()
  2. 7 countries.module \countries_field_extra_fields()

Implements hook_field_extra_fields().

File

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

Code

function countries_field_extra_fields() {
  $extra = array();
  $extra['country']['country'] = array(
    'form' => array(),
    'display' => array(),
  );
  $weight = -20;
  foreach (countries_core_properties() as $key => $title) {
    $extra['country']['country']['form'][$key] = array(
      'label' => $title,
      'description' => $title,
      'weight' => $weight++,
    );
  }
  return $extra;
}