function dxpr_gridstack_field_formatter_settings_summary in DXPR GridStack 7
Implements hook_field_formatter_settings_summary().
File
- ./
dxpr_gridstack.module, line 105 - Code for the DXPR GridStack feature.
Code
function dxpr_gridstack_field_formatter_settings_summary($field, $instance, $view_mode) {
$display = $instance['display'][$view_mode];
$settings = $display['settings'];
$summary = array();
$image_styles = image_style_options(FALSE);
// Unset possible 'No defined styles' option.
unset($image_styles['']);
if (isset($image_styles[$settings['image_style']])) {
$summary[] = t('URL for image style: @style', array(
'@style' => $image_styles[$settings['image_style']],
));
}
else {
$summary[] = t('Original image URL');
}
$link_types = array(
'content' => t('Linked to content'),
'file' => t('Linked to file'),
);
// Display this setting only if image is linked.
if (isset($link_types[$settings['image_link']])) {
$summary[] = $link_types[$settings['image_link']];
}
return implode('<br />', $summary);
}