You are here

public static function OfficeHoursFormatterBase::defaultSettings in Office Hours 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 OfficeHoursFormatterBase::defaultSettings()
OfficeHoursFormatterSchema::defaultSettings in src/Plugin/Field/FieldFormatter/OfficeHoursFormatterSchema.php
From https://schema.org/openingHours : The general opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each…
1 method overrides OfficeHoursFormatterBase::defaultSettings()
OfficeHoursFormatterSchema::defaultSettings in src/Plugin/Field/FieldFormatter/OfficeHoursFormatterSchema.php
From https://schema.org/openingHours : The general opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each…

File

src/Plugin/Field/FieldFormatter/OfficeHoursFormatterBase.php, line 24

Class

OfficeHoursFormatterBase
Abstract plugin implementation of the formatter.

Namespace

Drupal\office_hours\Plugin\Field\FieldFormatter

Code

public static function defaultSettings() {
  return [
    'day_format' => 'long',
    'time_format' => 'G',
    'compress' => FALSE,
    'grouped' => FALSE,
    'show_closed' => 'all',
    'closed_format' => 'Closed',
    'separator' => [
      'days' => '<br />',
      'grouped_days' => ' - ',
      'day_hours' => ': ',
      'hours_hours' => '-',
      'more_hours' => ', ',
    ],
    'current_status' => [
      'position' => '',
      // Hidden.
      'open_text' => 'Currently open!',
      'closed_text' => 'Currently closed',
    ],
    'schema' => [
      'enabled' => FALSE,
    ],
    'timezone_field' => '',
    'office_hours_first_day' => '',
  ] + parent::defaultSettings();
}