You are here

function imagefield_crop_field_formatter_settings_summary in Imagefield Crop 7.3

Implements hook_field_formatter_settings_summary().

Parameters

$field:

$instance:

$view_mode:

File

./imagefield_crop.module, line 337

Code

function imagefield_crop_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  $summary = image_field_formatter_settings_summary($field, $instance, $view_mode);
  $preset = imagefield_crop_preset_load_by_name($settings['preset']);
  $summary = t('Imagefield crop preset: @name', array(
    '@name' => !empty($preset->label) ? $preset->label : 'Default Preset',
  )) . '<br>' . $summary;
  if (isset($settings['image_link']) && $settings['image_link'] == 'file') {
    $summary .= ' ' . t('with image style @style', array(
      '@style' => $settings['image_link_style'],
    ));
  }
  return $summary;
}