You are here

function recipe_field_formatter_settings_summary in Recipe 7.2

Implements hook_field_formatter_settings_summary().

File

./recipe.module, line 657
Contains functions for Recipe node CRUD and display.

Code

function recipe_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  $summary = '';
  if ($display['type'] == 'recipe_ingredient_default') {
    $summary = t('Fractions display string: @fraction_format', array(
      '@fraction_format' => $settings['fraction_format'],
    )) . '<br />';
    $summary .= t('Ingredient unit display: @unit_abbreviation', array(
      '@unit_abbreviation' => $settings['unit_abbreviation'],
    ));
  }
  return $summary;
}