You are here

public static function GeneralNumberWithBarIndicatorFormatter::defaultSettings in Formatter Suite 8

Defines the default settings for this plugin.

Return value

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

Overrides GeneralNumberFormatter::defaultSettings

1 call to GeneralNumberWithBarIndicatorFormatter::defaultSettings()
GeneralNumberWithBarIndicatorFormatter::sanitizeSettings in src/Plugin/Field/FieldFormatter/GeneralNumberWithBarIndicatorFormatter.php
Sanitize settings to insure that they are safe and valid.

File

src/Plugin/Field/FieldFormatter/GeneralNumberWithBarIndicatorFormatter.php, line 58

Class

GeneralNumberWithBarIndicatorFormatter
Presents an integer as a labeled horizontal bar of varying length.

Namespace

Drupal\formatter_suite\Plugin\Field\FieldFormatter

Code

public static function defaultSettings() {
  return array_merge([
    'barLength' => '200',
    'barWidth' => '15',
    'barColor' => '#000000',
    'backgroundColor' => '#ffffff',
    'valueLocation' => 'right',
  ], parent::defaultSettings());
}