You are here

function phone_field_info in Phone 7.2

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

Implements hook_field_info().

2 calls to phone_field_info()
_phone_update_cck_phone_instance_settings in ./phone.module
Helper function for migrate/update functions: convert cck_phone-6.x and cck_phone-7.x-1.x instance settings to new values.
_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 170
The phone module lets administrators use a phone number field type.

Code

function phone_field_info() {
  return array(
    'phone' => array(
      'label' => t('Phone'),
      'description' => t('Store a number, country code, and optional extension and number type on an entity.'),
      'settings' => array(
        'enable_numbertype' => FALSE,
        'numbertype_allowed_values' => array(
          'home',
          'work',
          'cell',
          'fax',
        ),
      ),
      'instance_settings' => array(
        'country_options' => array(
          'enable_country' => TRUE,
          'enable_default_country' => TRUE,
          'default_country' => NULL,
          'all_country_codes' => TRUE,
          'country_codes' => array(
            'hide_single_cc' => FALSE,
            'country_selection' => array(),
          ),
        ),
        'enable_extension' => FALSE,
      ),
      'default_formatter' => 'phone_international',
      'default_widget' => 'phone',
      'property_type' => 'field_item_phone',
      'property_callbacks' => array(
        'phone_field_property_info_callback',
      ),
      'microdata' => TRUE,
    ),
  );
}