You are here

function blockreference_field_formatter_settings_summary in Block reference 7.2

Implements hook_field_formatter_settings_summary().

File

./blockreference.field.inc, line 113

Code

function blockreference_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  $summary = array();
  if ($display['type'] === 'blockreference_config_link') {
    $summary[] = t('Label: @label', array(
      '@label' => $settings['label'],
    ));
    $summary[] = $settings['destination'] ? t('with <code>?destination</code>') : t('no <code>?destination</code>');
  }
  if (isset($settings['show_empty_blocks'])) {
    $summary[] = $settings['show_empty_blocks'] ? t('Show empty blocks') : t('Hide empty blocks (by pre-rendering)');
  }
  return implode('<br>', $summary);
}