You are here

function clipboardjs_field_formatter_settings_summary in Clipboard.js 7

Implements hook_field_formatter_settings_summary().

File

./clipboardjs.module, line 124
Integrates the Clipboard.js library with Drupal.

Code

function clipboardjs_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $return = array();
  switch ($display['type']) {
    case 'text_clipboardjs':
      $return = array(
        'Alert Style: ' . $display['settings']['alert_style'],
        'Alert Text: ' . $display['settings']['alert_text'],
        'Button Label: ' . $display['settings']['button_label'],
      );
      break;
  }
  return implode('<br />', $return);
}