You are here

function countries_field_formatter_info in Countries 8

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

Implements hook_field_formatter_info().

1 call to countries_field_formatter_info()
countries_field_diff_options_form in ./countries.diff.inc
Provide a form for setting the field comparison options.

File

./countries.fields.inc, line 82
All field related code.

Code

function countries_field_formatter_info() {
  $formatters = array(
    'country_default' => array(
      'label' => t('Default'),
      'field types' => array(
        'country',
      ),
    ),
    'country_official' => array(
      'label' => t('Official name'),
      'field types' => array(
        'country',
      ),
    ),
    'country_alpha_2' => array(
      'label' => t('ISO alpha-2 code'),
      'field types' => array(
        'country',
      ),
    ),
    'country_alpha_3' => array(
      'label' => t('ISO alpha-3 code'),
      'field types' => array(
        'country',
      ),
    ),
    'country_number' => array(
      'label' => t('ISO numeric-3 code'),
      'field types' => array(
        'country',
      ),
    ),
    'country_continent' => array(
      'label' => t('Continent'),
      'field types' => array(
        'country',
      ),
    ),
    'country_continent_code' => array(
      'label' => t('Continent code'),
      'field types' => array(
        'country',
      ),
    ),
  );

  // Adds a formatter option for the country icon.
  if (module_exists('countryicons')) {
    $formatters['country_icon'] = array(
      'label' => t('Country Icon'),
      'field types' => array(
        'country',
      ),
      'settings' => array(
        'countryiconset' => '',
        'property' => '',
      ),
    );
  }
  return $formatters;
}