list_field_info

Versions
mediamosa-21
list_field_info()

Implements hook_field_info().

Code

modules/field/modules/list/list.module, line 24

<?php
function list_field_info() {
  return array(
    'list' => array(
      'label' => t('List'),
      'description' => t('This field stores numeric keys from key/value lists of allowed values where the key is a simple alias for the position of the value, i.e. 0|First option, 1|Second option, 2|Third option.'),
      'settings' => array('allowed_values' => '', 'allowed_values_function' => ''),
      'default_widget' => 'options_select',
      'default_formatter' => 'list_default',
    ),
    'list_boolean' => array(
      'label' => t('Boolean'),
      'description' => t('This field stores simple on/off or yes/no options.'),
      'settings' => array('allowed_values' => '', 'allowed_values_function' => ''),
      'default_widget' => 'options_buttons',
      'default_formatter' => 'list_default',
    ),
    'list_number' => array(
      'label' => t('List (numeric)'),
      'description' => t('This field stores keys from key/value lists of allowed numbers where the stored numeric key has significance and must be preserved, i.e. \'Lifetime in days\': 1|1 day, 7|1 week, 31|1 month.'),
      'settings' => array('allowed_values' => '', 'allowed_values_function' => ''),
      'default_widget' => 'options_select',
      'default_formatter' => 'list_default',
    ),
    'list_text' => array(
      'label' => t('List (text)'),
      'description' => t('This field stores keys from key/value lists of allowed values where the stored key has significance and must be a varchar, i.e. \'US States\': IL|Illinois, IA|Iowa, IN|Indiana'),
      'settings' => array('allowed_values' => '', 'allowed_values_function' => ''),
      'default_widget' => 'options_select',
      'default_formatter' => 'list_default',
    ),
  );
}
?>