You are here

function phone_field_formatter_info in Phone 7.2

Same name and namespace in other branches
  1. 5 phone.module \phone_field_formatter_info()
  2. 6 phone.module \phone_field_formatter_info()
  3. 7 phone.module \phone_field_formatter_info()

Implements hook_field_formatter_info().

2 calls to phone_field_formatter_info()
phone_token_info in ./phone.tokens.inc
Implements hook_token_info().
_phone_update_phone_instance_settings in ./phone.module
Helper function for migrate/update functions: convert phone-6.x and phone-7.x-1.x instance settings to new values.

File

./phone.module, line 547
The phone module lets administrators use a phone number field type.

Code

function phone_field_formatter_info() {
  $base = array(
    'field types' => array(
      'phone',
    ),
    'settings' => array(
      'as_tel_link' => FALSE,
      'full_hcard' => FALSE,
      'allow_alpha' => FALSE,
      'country_name_position' => 'after',
      'numbertype_position' => 'before',
      'extension_prefix' => t(' ext. '),
      'components' => array(
        'numbertype' => 'numbertype',
        'extension' => 'extension',
      ),
    ),
  );
  return array(
    'phone_international' => $base + array(
      'label' => t('International'),
      'description' => t('ITU-T Recommendation for International numbers. e.g., +41 44 668 1800 ext. 1000'),
    ),
    'phone_national' => $base + array(
      'label' => t('National'),
      'description' => t('ITU-T Recommendation for National numbers. e.g., 044 668 1800 ext. 1000'),
    ),
    'phone_e164' => $base + array(
      'label' => t('E164'),
      'description' => t('International without formatting, and without the extension. e.g., +41446681800'),
    ),
    'phone_rfc3966' => $base + array(
      'label' => t('RFC3966'),
      'description' => t('International, but with all spaces and other separating symbols replaced with a hyphen. e.g., +41-44-668-1800;ext=1000'),
    ),
  );
}