function DescriptionAwareFileFormatterBase::defaultSettings

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

Overrides PluginSettingsBase::defaultSettings

File

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

Class

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

Namespace

Drupal\file\Plugin\Field\FieldFormatter

Code

public static function defaultSettings() {
    $settings = parent::defaultSettings();
    $settings['use_description_as_link_text'] = TRUE;
    return $settings;
}

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