1 entityreference.module entityreference_field_widget_info()

Implements hook_field_widget_info().

File

core/modules/entityreference/entityreference.module, line 690
Entityreference primary module file.

Code

function entityreference_field_widget_info() {
  $widgets['entityreference_autocomplete'] = array(
    'label' => t('Autocomplete'),
    'description' => t('An autocomplete text field.'),
    'field types' => array('entityreference'),
    'settings' => array(
      'match_operator' => 'CONTAINS',
      'size' => 60,
      'hide_ids' => FALSE,
      // We don't have a default here, because it's not the same between
      // the two widgets, and the Field API doesn't update default
      // settings when the widget changes.
      'path' => '',
    ),
  );

  $widgets['entityreference_autocomplete_tags'] = array(
    'label' => t('Autocomplete (Tags style)'),
    'description' => t('An autocomplete text field.'),
    'field types' => array('entityreference'),
    'settings' => array(
      'match_operator' => 'CONTAINS',
      'size' => 60,
      'hide_ids' => FALSE,
      // We don't have a default here, because it's not the same between
      // the two widgets, and the Field API doesn't update default
      // settings when the widget changes.
      'path' => '',
    ),
    'behaviors' => array(
      'multiple values' => FIELD_BEHAVIOR_CUSTOM,
    ),
  );

  return $widgets;
}