function hook_field_formatter_settings_summary

×

Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
cis7 field_ui.api.php hook_field_formatter_settings_summary($field, $instance, $view_mode)
cle7 field_ui.api.php hook_field_formatter_settings_summary($field, $instance, $view_mode)
elmsmedia7 field_ui.api.php hook_field_formatter_settings_summary($field, $instance, $view_mode)
icor7 field_ui.api.php hook_field_formatter_settings_summary($field, $instance, $view_mode)
meedjum_blog7 field_ui.api.php hook_field_formatter_settings_summary($field, $instance, $view_mode)
mooc7 field_ui.api.php hook_field_formatter_settings_summary($field, $instance, $view_mode)

Return a short summary for the current formatter settings of an instance.

If an empty result is returned, the formatter is assumed to have no configurable settings, and no UI will be provided to display a settings form.

Parameters

$field: The field structure.

$instance: The instance structure.

$view_mode: The view mode for which a settings summary is requested.

Return value

A string containing a short summary of the formatter settings.

Related topics

20 functions implement hook_field_formatter_settings_summary()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

date_field_formatter_settings_summary in sites/all/modules/ulmus/date/date.field.inc
Implements hook_field_formatter_settings_summary().
ds_field_formatter_settings_summary in sites/all/modules/ulmus/ds/includes/ds.field_ui.inc
Implements hook_field_formatter_settings_summary().
entityreference_field_formatter_settings_summary in sites/all/modules/ulmus/entityreference/entityreference.module
Implements hook_field_formatter_settings_summary().
field_collection_fieldset_field_formatter_settings_summary in sites/all/modules/ulmus/field_collection_fieldset/field_collection_fieldset.module
Implements hook_field_formatter_settings_summary().
field_collection_field_formatter_settings_summary in sites/all/modules/ulmus/field_collection/field_collection.module
Implements hook_field_formatter_settings_summary().

... See full list

2 invocations of hook_field_formatter_settings_summary()
field_ui_display_overview_form in modules/field_ui/field_ui.admin.inc
Form constructor for the field display settings for a given view mode.
_ds_field_ui_core_fields in sites/all/modules/ulmus/ds/includes/ds.field_ui.inc
Alter the core field on the the Field UI form.

File

modules/field_ui/field_ui.api.php, line 189
Hooks provided by the Field UI module.

Code

function hook_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];

  $summary = '';

  if ($display['type'] == 'text_trimmed' || $display['type'] == 'text_summary_or_trimmed') {
    $summary = t('Length: @chars chars', array('@chars' => $settings['trim_length']));
  }

  return $summary;
}