You are here

public static function FileBrowserWidget::defaultSettings in Entity Browser 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldWidget/FileBrowserWidget.php \Drupal\entity_browser\Plugin\Field\FieldWidget\FileBrowserWidget::defaultSettings()

Defines the default settings for this plugin.

Return value

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

Overrides EntityReferenceBrowserWidget::defaultSettings

File

src/Plugin/Field/FieldWidget/FileBrowserWidget.php, line 137

Class

FileBrowserWidget
Entity browser file widget.

Namespace

Drupal\entity_browser\Plugin\Field\FieldWidget

Code

public static function defaultSettings() {
  $settings = parent::defaultSettings();

  // These settings are hidden.
  unset($settings['field_widget_display']);
  unset($settings['field_widget_display_settings']);
  $settings['view_mode'] = 'default';
  $settings['preview_image_style'] = 'thumbnail';
  return $settings;
}