You are here

function paragraphs_table_field_formatter_settings_summary in Paragraphs table 7

Implements hook_field_formatter_settings_summary().

File

./paragraphs_table.module, line 114
Module file for Paragraph table module.

Code

function paragraphs_table_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  $output = '';
  if ($display['type'] == 'paragraphs_table_view') {
    $output .= '<br>';
    $output .= !empty($settings['hide_empty']) ? t('Empty paragraphs: Hidden') : t('Empty paragraphs: Shown');
    $output .= '<br>';
    $output .= !empty($settings['empty']) ? t('Empty columns: Hidden') : t('Empty columns: Shown');
    $output .= '<br>';
    $output .= !empty($settings['vertical']) ? t('Table mode: Vertical') : '';
  }
  return $output;
}