You are here

function entityreference_field_info in Entity reference 7

Same name and namespace in other branches
  1. 8 entityreference.module \entityreference_field_info()

Implements hook_field_info().

File

./entityreference.module, line 58
Entityreference primary module file.

Code

function entityreference_field_info() {
  $field_info['entityreference'] = array(
    'label' => t('Entity Reference'),
    'description' => t('This field references another entity.'),
    'settings' => array(
      // Default to the core target entity type node.
      'target_type' => 'node',
      // The handler for this field.
      'handler' => 'base',
      // The handler settings.
      'handler_settings' => array(),
    ),
    'instance_settings' => array(),
    'default_widget' => 'entityreference_autocomplete',
    'default_formatter' => 'entityreference_label',
    'property_callbacks' => array(
      'entityreference_field_property_callback',
    ),
  );
  return $field_info;
}