You are here

function user_reference_field_info in References 7.2

Implements hook_field_info().

File

user_reference/user_reference.module, line 25
Defines a field type for referencing a user from a node.

Code

function user_reference_field_info() {
  return array(
    'user_reference' => array(
      'label' => t('User reference'),
      'description' => t('This field stores the ID of a related user as an integer value.'),
      'settings' => array(
        'referenceable_roles' => array(),
        'referenceable_status' => array(),
        'view' => array(
          'view_name' => '',
          'display_name' => '',
          'args' => array(),
        ),
      ),
      'default_widget' => 'user_reference_autocomplete',
      'default_formatter' => 'user_reference_default',
      // Support hook_entity_property_info() from contrib "Entity API".
      'property_type' => 'user',
      // Support default token formatter for field tokens.
      'default_token_formatter' => 'user_reference_plain',
    ),
  );
}