You are here

function skype_field_formatter_settings_summary in Skype 7

Implements hook_field_formatter_settings_summary().

File

./skype.module, line 186

Code

function skype_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  $lines = array();
  switch ($display['type']) {
    case 'skype_button':
      $actions = array_filter($settings['actions']);
      $lines[] = t('Button action(s): @actions', array(
        '@actions' => implode(', ', $actions),
      ));
      $lines[] = t('Button color: @color', array(
        '@color' => $settings['image_color'],
      ));
      $lines[] = t('Button size: @sizepx', array(
        '@size' => $settings['image_size'],
      ));
      break;
    case 'skype_uri':
      $lines[] = t('URI action: @actions', array(
        '@actions' => $settings['action'],
      ));
      $lines[] = t('URI text: @text', array(
        '@text' => $settings['link_text'],
      ));
      break;
  }
  return implode('<br />', $lines);
}