function flipping_book_reference_field_formatter_info in Flipping Book 7
Implements hook_field_formatter_info().
File
- ./
flipping_book_reference.module, line 116 - Defines a field type for referencing one flipping_book from a node.
Code
function flipping_book_reference_field_formatter_info() {
$info = array(
'flipping_book_reference_default' => array(
'label' => t('Title (link)'),
'description' => t('Display the title of the referenced flipping_book as a link to the flipping_book page.'),
'field types' => array(
'flipping_book_reference',
),
'settings' => array(
'target' => FLIPPING_BOOK_REFERENCE_LINK_TARGET_DEFAULT,
),
),
'flipping_book_reference_plain' => array(
'label' => t('Title (no link)'),
'description' => t('Display the title of the referenced flipping_book as plain text.'),
'field types' => array(
'flipping_book_reference',
),
),
'flipping_book_reference_fbid' => array(
'label' => t('Flipping Book ID'),
'description' => t('Display the referenced flipping_book ID'),
'field types' => array(
'flipping_book_reference',
),
),
'flipping_book_reference_path' => array(
'label' => t('URL as plain text'),
'description' => t('Display the URL of the referenced flipping_book'),
'field types' => array(
'flipping_book_reference',
),
'settings' => array(
'absolute' => FALSE,
),
),
);
if (module_exists('colorbox') && variable_get('colorbox_load', FALSE)) {
$info['flipping_book_reference_colorbox'] = array(
'label' => t('Colorbox link'),
'description' => t('Display the title of the referenced flipping_book as a colorbox link to the flipping_book page.'),
'field types' => array(
'flipping_book_reference',
),
'settings' => array(
'width' => '800',
'height' => '500',
'link_title' => '',
),
);
}
return $info;
}