You are here

function countries_field_extra_fields in Countries 7

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

Implements hook_field_extra_fields().

File

./countries.module, line 634

Code

function countries_field_extra_fields() {
  $extra = array();
  $extra['country']['country'] = array(
    'form' => array(),
    'display' => array(),
  );
  $core_properties = array(
    'iso2' => t('ISO alpha-2 code'),
    'iso3' => t('ISO alpha-3 code'),
    'name' => t('Name'),
    'official_name' => t('Official name'),
    'numcode' => t('ISO numeric-3 code'),
    'continent' => t('Continent'),
    'enabled' => t('Enabled'),
  );
  $weight = -20;
  foreach ($core_properties as $key => $title) {
    $extra['country']['country']['form'][$key] = array(
      'label' => $title,
      'description' => $title,
      'weight' => $weight++,
    );
  }
  return $extra;
}