You are here

public function ExtractedText::settingsSummary in Search API attachments 8

Same name and namespace in other branches
  1. 9.0.x src/Plugin/Field/FieldFormatter/ExtractedText.php \Drupal\search_api_attachments\Plugin\Field\FieldFormatter\ExtractedText::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

src/Plugin/Field/FieldFormatter/ExtractedText.php, line 289

Class

ExtractedText
File formatter displaying text extracted form attachment document.

Namespace

Drupal\search_api_attachments\Plugin\Field\FieldFormatter

Code

public function settingsSummary() {
  $summary = [];
  $summary[] = $this
    ->t('Excluded file extensions: @extensions', [
    '@extensions' => $this
      ->getSetting('excluded_extensions'),
  ]);
  $summary[] = $this
    ->t('Maximum upload size: @maxsize', [
    '@maxsize' => $this
      ->getSetting('max_filesize'),
  ]);
  $isexcluded = $this
    ->getSetting('excluded_private') ? 'true' : 'false';
  $summary[] = $this
    ->t('Exclude private files: @isexcluded', [
    '@isexcluded' => $isexcluded,
  ]);
  return $summary;
}