You are here

function list_field_widget_info_alter in Drupal 7

Implements hook_field_widget_info_alter().

The List module does not implement widgets of its own, but reuses the widgets defined in options.module.

See also

list_options_list()

File

modules/field/modules/list/list.module, line 422
Defines list field types that can be used with the Options module.

Code

function list_field_widget_info_alter(&$info) {
  $widgets = array(
    'options_select' => array(
      'list_integer',
      'list_float',
      'list_text',
    ),
    'options_buttons' => array(
      'list_integer',
      'list_float',
      'list_text',
      'list_boolean',
    ),
    'options_onoff' => array(
      'list_boolean',
    ),
  );
  foreach ($widgets as $widget => $field_types) {
    $info[$widget]['field types'] = array_merge($info[$widget]['field types'], $field_types);
  }
}