You are here

function countries_field_extra_fields in Countries 7.2

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

Implements hook_field_extra_fields().

File

./countries.module, line 210
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;
}