You are here

function node_reference_field_info in References 7.2

Implements hook_field_info().

File

node_reference/node_reference.module, line 25
Defines a field type for referencing one node from another.

Code

function node_reference_field_info() {
  return array(
    'node_reference' => array(
      'label' => t('Node reference'),
      'description' => t('This field stores the ID of a related node as an integer value.'),
      'settings' => array(
        'referenceable_types' => array(),
        'view' => array(
          'view_name' => '',
          'display_name' => '',
          'args' => array(),
        ),
      ),
      // It probably make more sense to have the referenceable types be
      // per-field than per-instance
      // 'instance settings' => array('referenceable_types' => array()),
      // node_reference_autocomplete',
      'default_widget' => 'options_select',
      'default_formatter' => 'node_reference_default',
      // Support hook_entity_property_info() from contrib "Entity API".
      'property_type' => 'node',
      // Support default token formatter for field tokens.
      'default_token_formatter' => 'node_reference_plain',
    ),
  );
}