function field_collection_field_formatter_settings_summary in Field collection 7
Implements hook_field_formatter_settings_summary().
File
- ./
field_collection.module, line 942 - Module implementing field collection field type.
Code
function field_collection_field_formatter_settings_summary($field, $instance, $view_mode) {
$display = $instance['display'][$view_mode];
$settings = $display['settings'];
$output = array();
if ($display['type'] !== 'field_collection_fields') {
$links = field_collection_get_operations($settings, TRUE);
if ($links) {
$output[] = t('Links: @links', array(
'@links' => check_plain(implode(', ', $links)),
));
}
else {
$output[] = t('Links: none');
}
}
if ($display['type'] !== 'field_collection_list') {
$entity_type = entity_get_info('field_collection_item');
if (!empty($entity_type['view modes'][$settings['view_mode']]['label'])) {
$output[] = t('View mode: @mode', array(
'@mode' => $entity_type['view modes'][$settings['view_mode']]['label'],
));
}
}
return implode('<br>', $output);
}