function BooleanFormatter::defaultSettings

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/BooleanFormatter.php \Drupal\Core\Field\Plugin\Field\FieldFormatter\BooleanFormatter::defaultSettings()
  2. 10 core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/BooleanFormatter.php \Drupal\Core\Field\Plugin\Field\FieldFormatter\BooleanFormatter::defaultSettings()
  3. 11.x core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/BooleanFormatter.php \Drupal\Core\Field\Plugin\Field\FieldFormatter\BooleanFormatter::defaultSettings()

Overrides PluginSettingsBase::defaultSettings

File

core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/BooleanFormatter.php, line 25

Class

BooleanFormatter
Plugin implementation of the 'boolean' formatter.

Namespace

Drupal\Core\Field\Plugin\Field\FieldFormatter

Code

public static function defaultSettings() {
    $settings = [];
    // Fall back to field settings by default.
    $settings['format'] = 'default';
    $settings['format_custom_false'] = '';
    $settings['format_custom_true'] = '';
    return $settings;
}

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