function nodereferrer_field_formatter_settings_summary in NodeReferrer 7
Implements hook_field_formatter_settings_summary().
File
- ./
nodereferrer.module, line 416 - Defines a field type for backlinking referencing nodes.
Code
function nodereferrer_field_formatter_settings_summary($field, $instance, $view_mode) {
$display = $instance['display'][$view_mode];
$settings = $display['settings'];
$summary = array();
if ($display['type'] === 'nodereferrer_node') {
$entity_info = entity_get_info('node');
$modes = $entity_info['view modes'];
$mode = $modes[$settings['nodereferrer_view_mode']]['label'];
$summary[] = t('View mode: %mode', array(
'%mode' => $mode,
));
}
if (!empty($settings['prefix_suffix'])) {
$summary[] = t('Display with prefix and suffix.');
}
else {
$summary[] = ' ';
}
return implode('<br />', $summary);
}