You are here

public static function DateTimeTimeAgoFormatter::defaultSettings in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/datetime/src/Plugin/Field/FieldFormatter/DateTimeTimeAgoFormatter.php \Drupal\datetime\Plugin\Field\FieldFormatter\DateTimeTimeAgoFormatter::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

core/modules/datetime/src/Plugin/Field/FieldFormatter/DateTimeTimeAgoFormatter.php, line 80
Contains \Drupal\datetime\Plugin\Field\FieldFormatter\DateTimeTimeAgoFormatter.

Class

DateTimeTimeAgoFormatter
Plugin implementation of the 'Time ago' formatter for 'datetime' fields.

Namespace

Drupal\datetime\Plugin\Field\FieldFormatter

Code

public static function defaultSettings() {
  $settings = array(
    'future_format' => '@interval hence',
    'past_format' => '@interval ago',
    'granularity' => 2,
  ) + parent::defaultSettings();
  return $settings;
}