You are here

function _linkicon_field_formatter_settings_summary in Link Icon 7

Implements hook_field_formatter_settings_summary().

1 call to _linkicon_field_formatter_settings_summary()
linkicon_field_formatter_settings_summary in ./linkicon.module
Implements hook_field_formatter_settings_summary().

File

includes/linkicon.admin.inc, line 260
Provides admin related functions.

Code

function _linkicon_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  $summary = array();
  $summary[] = t('Base class: <em>@linkicon_prefix</em>.', array(
    '@linkicon_prefix' => $settings['linkicon_prefix'],
  ));
  $summary[] = t('Module CSS: <em>@linkicon_load</em>. Wrapper: <em>@linkicon_wrapper_class</em>. Style: <em>@linkicon_style</em>. Bg: <em>@linkicon_color</em>.', array(
    '@linkicon_load' => $settings['linkicon_load'] ? t('Yes') : t('No'),
    '@linkicon_wrapper_class' => $settings['linkicon_wrapper_class'] ? $settings['linkicon_wrapper_class'] : t('None'),
    '@linkicon_vertical' => $settings['linkicon_vertical'] ? t('Vertical') : t('Horizontal'),
    '@linkicon_style' => $settings['linkicon_style'] ? $settings['linkicon_style'] : t('None'),
    '@linkicon_color' => $settings['linkicon_color'] ? $settings['linkicon_color'] : t('None'),
  ));
  if ($settings['linkicon_load']) {
    $summary[] = t('Size: <em>@linkicon_size</em>. No text: <em>@linkicon_no_text</em>. Tooltip: <em>@linkicon_tooltip</em>', array(
      '@linkicon_size' => $settings['linkicon_size'],
      '@linkicon_no_text' => $settings['linkicon_no_text'] ? t('Yes') : t('No'),
      '@linkicon_tooltip' => $settings['linkicon_tooltip'] ? t('Yes') : t('No'),
    ));
    if (empty($settings['linkicon_no_text'])) {
      $summary[] = t('Use global title: <em>@linkicon_global_title</em>. <br />Icon position: <em>@linkicon_position</em>.', array(
        '@linkicon_global_title' => $settings['linkicon_global_title'] ? $settings['linkicon_global_title'] : t('No'),
        '@linkicon_position' => $settings['linkicon_position'] ? $settings['linkicon_position'] : t('Left'),
      ));
    }
    $summary[] = t('Font icon path: <em>@linkicon_font</em>.', array(
      '@linkicon_font' => $settings['linkicon_font'] ? $settings['linkicon_font'] : t('No'),
    ));
    $summary[] = t('Icon provider: <em>@linkicon_bundle</em>.', array(
      '@linkicon_bundle' => $settings['linkicon_bundle'] ? $settings['linkicon_bundle'] : t('No'),
    ));
    $summary[] = t('Extra icon classes: <em>@linkicon_icon_class</em>.', array(
      '@linkicon_icon_class' => isset($settings['linkicon_icon_class']) ? $settings['linkicon_icon_class'] : t('No'),
    ));
  }
  return $summary;
}