You are here

function registration_field_formatter_settings_summary in Entity Registration 7

Same name and namespace in other branches
  1. 8.2 includes/registration.field.inc \registration_field_formatter_settings_summary()
  2. 7.2 includes/registration.field.inc \registration_field_formatter_settings_summary()

Implements hook_field_formatter_settings_summary().

File

includes/registration.field.inc, line 235
Field hooks.

Code

function registration_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  $summary = '';
  if ($display['type'] == 'registration_link') {
    if (!empty($settings['label'])) {
      $summary = t('Registration label: @label.', array(
        '@label' => $settings['label'],
      ));
    }
    else {
      $summary = t('Registration label: Parent label.');
    }
  }
  return $summary;
}