public static function NumberWithBytesFormatter::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 PluginSettingsBase::defaultSettings
1 call to NumberWithBytesFormatter::defaultSettings()
- NumberWithBytesFormatter::sanitizeSettings in src/
Plugin/ Field/ FieldFormatter/ NumberWithBytesFormatter.php - Sanitize settings to insure that they are safe and valid.
File
- src/
Plugin/ Field/ FieldFormatter/ NumberWithBytesFormatter.php, line 52
Class
- NumberWithBytesFormatter
- Formats numbers with a byte suffix, like "bytes", "KB", or "MB".
Namespace
Drupal\formatter_suite\Plugin\Field\FieldFormatterCode
public static function defaultSettings() {
return array_merge([
'kunit' => 1000,
'fullWord' => FALSE,
'decimalDigits' => 2,
], parent::defaultSettings());
}