You are here

function viewreference_field_info in View reference 6.3

Same name and namespace in other branches
  1. 6 viewreference.module \viewreference_field_info()
  2. 6.2 viewreference.module \viewreference_field_info()
  3. 7.3 viewreference.module \viewreference_field_info()

Implementation of hook_field_info().

Here we indicate that the content module will use its default handling for the view of this field.

Callbacks can be omitted if default handing is used. They're included here just so this module can be used as an example for custom modules that might do things differently.

File

./viewreference.module, line 70
Defines a field type for referencing a view from a node.

Code

function viewreference_field_info() {
  return array(
    'viewreference' => array(
      'label' => t('View reference'),
      'description' => t('Reference a views display from the views module.'),
      'callbacks' => array(
        'tables' => CONTENT_CALLBACK_DEFAULT,
        'arguments' => CONTENT_CALLBACK_DEFAULT,
      ),
    ),
  );
}