You are here

function blockreference_field_info in Block reference 6

Same name and namespace in other branches
  1. 7.2 blockreference.field.inc \blockreference_field_info()
  2. 7 blockreference.module \blockreference_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

./blockreference.module, line 68
Defines a field type for referencing a block from a node.

Code

function blockreference_field_info() {
  return array(
    'blockreference' => array(
      'label' => t('Block reference'),
      'description' => t('Store the ID of a related block as an integer value.'),
      'callbacks' => array(
        'tables' => CONTENT_CALLBACK_DEFAULT,
        'arguments' => CONTENT_CALLBACK_DEFAULT,
      ),
    ),
  );
}