function DefaultFileFormatter::defaultSettings
Same name in other branches
- 8.9.x core/modules/file/src/Plugin/Field/FieldFormatter/DefaultFileFormatter.php \Drupal\file\Plugin\Field\FieldFormatter\DefaultFileFormatter::defaultSettings()
- 10 core/modules/file/src/Plugin/Field/FieldFormatter/DefaultFileFormatter.php \Drupal\file\Plugin\Field\FieldFormatter\DefaultFileFormatter::defaultSettings()
- 11.x core/modules/file/src/Plugin/Field/FieldFormatter/DefaultFileFormatter.php \Drupal\file\Plugin\Field\FieldFormatter\DefaultFileFormatter::defaultSettings()
Overrides BaseFieldFileFormatterBase::defaultSettings
File
-
core/
modules/ file/ src/ Plugin/ Field/ FieldFormatter/ DefaultFileFormatter.php, line 24
Class
- DefaultFileFormatter
- Formatter for a text field on a file entity that links the field to the file.
Namespace
Drupal\file\Plugin\Field\FieldFormatterCode
public static function defaultSettings() {
$settings = parent::defaultSettings();
$settings['link_to_file'] = TRUE;
return $settings;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.