You are here

function taxonomy_image_field_formatter_settings_summary in Taxonomy Image 7

Implements hook_field_formatter_settings_summary().

File

./taxonomy_image.module, line 30
Implements a field formatter that can display image on referenced taxonomy terms.

Code

function taxonomy_image_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  if ($display['type'] != 'taxonomy_image_term_reference_image') {
    return;
  }
  $parameters = array(
    '%field_name' => $settings['field_name'],
    '%image_style' => empty($settings['image_style']) ? t('none') : $settings['image_style'],
    '%linked' => empty($settings['linked']) ? t('no') : t('yes'),
    '%text_alt' => empty($settings['text_alt']) ? t('no') : t('yes'),
  );
  return t('Field: %field_name, image style: %image_style, linked: %linked, text if no image: %text_alt', $parameters);
}