You are here

function cck_phone_field_info in Phone Number 7

Same name and namespace in other branches
  1. 6 cck_phone.module \cck_phone_field_info()

Implements hook_field_info().

File

./cck_phone.module, line 51
Defines phone number fields for CCK. Provide some verifications on the phone numbers

Code

function cck_phone_field_info() {
  return array(
    'phone_number' => array(
      'label' => t('Phone number'),
      'description' => t('Store a number and country code in the database to assemble a phone number.'),
      'settings' => array(
        'size' => CCK_PHONE_PHONE_MAX_LENGTH,
      ),
      'instance_settings' => array(
        'enable_default_country' => TRUE,
        'default_country' => NULL,
        'all_country_codes' => TRUE,
        'country_codes' => array(
          'hide_single_cc' => FALSE,
          'country_selection' => array(),
        ),
        'country_code_position' => 'after',
        'enable_country_level_validation' => TRUE,
        'enable_extension' => FALSE,
      ),
      'default_widget' => 'phone_number',
      'default_formatter' => 'global_phone_number',
      // Support hook_entity_property_info() from contrib "Entity API".
      'property_type' => 'field_item_phone_number',
      'property_callbacks' => array(
        'cck_phone_field_property_info_callback',
      ),
    ),
  );
}