You are here

public function TestFieldPrepareViewFormatter::settingsSummary in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/field/tests/modules/field_test/src/Plugin/Field/FieldFormatter/TestFieldPrepareViewFormatter.php \Drupal\field_test\Plugin\Field\FieldFormatter\TestFieldPrepareViewFormatter::settingsSummary()

Returns a short summary for the current formatter settings.

If an empty result is returned, a UI can still be provided to display a settings form in case the formatter has configurable settings.

Return value

string[] A short summary of the formatter settings.

Overrides FormatterBase::settingsSummary

File

core/modules/field/tests/modules/field_test/src/Plugin/Field/FieldFormatter/TestFieldPrepareViewFormatter.php, line 55
Contains \Drupal\field_test\Plugin\Field\FieldFormatter\TestFieldPrepareViewFormatter.

Class

TestFieldPrepareViewFormatter
Plugin implementation of the 'field_test_with_prepare_view' formatter.

Namespace

Drupal\field_test\Plugin\Field\FieldFormatter

Code

public function settingsSummary() {
  $summary = array();
  $summary[] = t('@setting: @value', array(
    '@setting' => 'test_formatter_setting_additional',
    '@value' => $this
      ->getSetting('test_formatter_setting_additional'),
  ));
  return $summary;
}