function DescriptionAwareFileFormatterBase::settingsSummary

Same name in other branches
  1. 9 core/modules/file/src/Plugin/Field/FieldFormatter/DescriptionAwareFileFormatterBase.php \Drupal\file\Plugin\Field\FieldFormatter\DescriptionAwareFileFormatterBase::settingsSummary()
  2. 8.9.x core/modules/file/src/Plugin/Field/FieldFormatter/DescriptionAwareFileFormatterBase.php \Drupal\file\Plugin\Field\FieldFormatter\DescriptionAwareFileFormatterBase::settingsSummary()
  3. 11.x core/modules/file/src/Plugin/Field/FieldFormatter/DescriptionAwareFileFormatterBase.php \Drupal\file\Plugin\Field\FieldFormatter\DescriptionAwareFileFormatterBase::settingsSummary()

Overrides FormatterBase::settingsSummary

File

core/modules/file/src/Plugin/Field/FieldFormatter/DescriptionAwareFileFormatterBase.php, line 42

Class

DescriptionAwareFileFormatterBase
Base class for file formatters that have to deal with file descriptions.

Namespace

Drupal\file\Plugin\Field\FieldFormatter

Code

public function settingsSummary() {
    $summary = parent::settingsSummary();
    if ($this->getSetting('use_description_as_link_text')) {
        $summary[] = $this->t('Use description as link text');
    }
    return $summary;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.