You are here

function nodereferrer_field_info in NodeReferrer 7

Same name and namespace in other branches
  1. 5 nodereferrer.module \nodereferrer_field_info()
  2. 6 nodereferrer.module \nodereferrer_field_info()

Implements hook_field_info().

File

./nodereferrer.module, line 25
Defines a field type for backlinking referencing nodes.

Code

function nodereferrer_field_info() {
  return array(
    'nodereferrer' => array(
      'label' => t('Node Referrers'),
      'description' => t('This field provides a counter part to node_reference field'),
      'instance_settings' => array(
        'prefix' => '',
        'suffix' => '',
      ),
      // It probably make more sense to have the settings per-field than per-instance.
      'settings' => array(
        'referrer_types' => array(),
        'referrer_fields' => array(),
        'referrer_translations' => 0,
        'referrer_nodes_per_page' => 0,
        'referrer_pager_element' => 0,
        'referrer_order' => 'TITLE_ASC',
      ),
      'default_widget' => 'nodereferrer_list',
      'default_formatter' => 'nodereferrer_default',
      // Support hook_entity_property_info() from contrib "Entity API".
      'property_type' => 'node',
    ),
  );
}