You are here

function phone_widget_info in Phone 6

Same name and namespace in other branches
  1. 5 phone.module \phone_widget_info()

Implementation of hook_widget_info().

Here we indicate that the content module will handle the default value and multiple values for these widgets.

Callbacks can be omitted if default handing is used. They're included here just so this module can be used as an example for custom modules that might do things differently.

IMPORTANT! - field and widget names will be truncated to 32 characters in the database and in internal arrays, like content_fields().

File

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

Code

function phone_widget_info() {
  return array(
    'phone_textfield' => array(
      'label' => t('Textfield'),
      'field types' => array(
        'fr_phone',
        'be_phone',
        'it_phone',
        'el_phone',
        'ch_phone',
        'ca_phone',
        'cr_phone',
        'pa_phone',
        'gb_phone',
        'ru_phone',
        'ua_phone',
        'es_phone',
        'au_phone',
        'cs_phone',
        'hu_phone',
        'pl_phone',
        'nl_phone',
        'se_phone',
        'za_phone',
        'il_phone',
        'nz_phone',
        'br_phone',
        'cl_phone',
        'cn_phone',
        'hk_phone',
        'mo_phone',
        'ph_phone',
        'sg_phone',
        'jo_phone',
        'eg_phone',
        'pk_phone',
        'int_phone',
      ),
      'multiple values' => CONTENT_HANDLE_CORE,
      'callbacks' => array(
        'default value' => CONTENT_CALLBACK_DEFAULT,
      ),
    ),
  );
}