1 list.module list_field_widget_info_alter(&$info)

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

core/modules/field/modules/list/list.module, line 460
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);
  }
}