You are here

public static function DefaultFileFormatter::defaultSettings in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/file/src/Plugin/Field/FieldFormatter/DefaultFileFormatter.php \Drupal\file\Plugin\Field\FieldFormatter\DefaultFileFormatter::defaultSettings()

Defines the default settings for this plugin.

Return value

array A list of default settings, keyed by the setting name.

Overrides BaseFieldFileFormatterBase::defaultSettings

File

core/modules/file/src/Plugin/Field/FieldFormatter/DefaultFileFormatter.php, line 29
Contains \Drupal\file\Plugin\Field\FieldFormatter\DefaultFileFormatter.

Class

DefaultFileFormatter
Formatter for a text field on a file entity that links the field to the file.

Namespace

Drupal\file\Plugin\Field\FieldFormatter

Code

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