You are here

public static function SmartDateCustomFormatter::defaultSettings in Smart Date 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldFormatter/SmartDateCustomFormatter.php \Drupal\smart_date\Plugin\Field\FieldFormatter\SmartDateCustomFormatter::defaultSettings()
  2. 3.x src/Plugin/Field/FieldFormatter/SmartDateCustomFormatter.php \Drupal\smart_date\Plugin\Field\FieldFormatter\SmartDateCustomFormatter::defaultSettings()
  3. 3.0.x src/Plugin/Field/FieldFormatter/SmartDateCustomFormatter.php \Drupal\smart_date\Plugin\Field\FieldFormatter\SmartDateCustomFormatter::defaultSettings()
  4. 3.1.x src/Plugin/Field/FieldFormatter/SmartDateCustomFormatter.php \Drupal\smart_date\Plugin\Field\FieldFormatter\SmartDateCustomFormatter::defaultSettings()
  5. 3.2.x src/Plugin/Field/FieldFormatter/SmartDateCustomFormatter.php \Drupal\smart_date\Plugin\Field\FieldFormatter\SmartDateCustomFormatter::defaultSettings()
  6. 3.3.x src/Plugin/Field/FieldFormatter/SmartDateCustomFormatter.php \Drupal\smart_date\Plugin\Field\FieldFormatter\SmartDateCustomFormatter::defaultSettings()
  7. 3.4.x src/Plugin/Field/FieldFormatter/SmartDateCustomFormatter.php \Drupal\smart_date\Plugin\Field\FieldFormatter\SmartDateCustomFormatter::defaultSettings()

Defines the default settings for this plugin.

Return value

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

Overrides TimestampFormatter::defaultSettings

File

src/Plugin/Field/FieldFormatter/SmartDateCustomFormatter.php, line 30

Class

SmartDateCustomFormatter
Plugin implementation of the 'Custom' formatter for 'smartdate' fields.

Namespace

Drupal\smart_date\Plugin\Field\FieldFormatter

Code

public static function defaultSettings() {
  return [
    'separator' => ' - ',
    'join' => ', ',
    'time_format' => 'g:ia',
    'time_hour_format' => 'ga',
    'date_format' => 'D, M j Y',
    'allday_label' => 'All day',
    'date_first' => '1',
    'ampm_reduce' => '1',
  ] + parent::defaultSettings();
}