You are here

public static function TimeRangeFormatter::defaultSettings in Time Field For Drupal 8.x / 9.x 8

Same name and namespace in other branches
  1. 2.x src/Plugin/Field/FieldFormatter/TimeRangeFormatter.php \Drupal\time_field\Plugin\Field\FieldFormatter\TimeRangeFormatter::defaultSettings()

Defines the default settings for this plugin.

Return value

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

Overrides PluginSettingsBase::defaultSettings

File

src/Plugin/Field/FieldFormatter/TimeRangeFormatter.php, line 84

Class

TimeRangeFormatter
Plugin implementation of the 'time_formatter' formatter.

Namespace

Drupal\time_field\Plugin\Field\FieldFormatter

Code

public static function defaultSettings() {
  return [
    'time_format' => 'h:i a',
    'timerange_format' => 'start ~ end',
  ] + parent::defaultSettings();
}