function media_gallery_field_formatter_settings_summary in Media Gallery 7
Same name and namespace in other branches
- 7.2 media_gallery.fields.inc \media_gallery_field_formatter_settings_summary()
Implements hook_field_formatter_settings_summary().
File
- ./
media_gallery.fields.inc, line 46 - Field API integration for media_gallery.module.
Code
function media_gallery_field_formatter_settings_summary($field, $instance, $view_mode) {
$display = $instance['display'][$view_mode];
$settings = $display['settings'];
$summary = '';
if ($display['type'] == 'media_gallery') {
$entity_info = entity_get_info('file');
$file_view_mode_label = isset($entity_info['view modes'][$settings['file_view_mode']]) ? $entity_info['view modes'][$settings['file_view_mode']]['label'] : t('Default');
$summary = t('File view mode: @view_mode', array(
'@view_mode' => $file_view_mode_label,
));
}
return $summary;
}