You are here

public static function DateRecurGranularityMap::granularityLabels in Recurring Dates Field 3.x

Same name and namespace in other branches
  1. 8.2 src/DateRecurGranularityMap.php \Drupal\date_recur\DateRecurGranularityMap::granularityLabels()
  2. 3.0.x src/DateRecurGranularityMap.php \Drupal\date_recur\DateRecurGranularityMap::granularityLabels()
  3. 3.1.x src/DateRecurGranularityMap.php \Drupal\date_recur\DateRecurGranularityMap::granularityLabels()

Granularities and their associated labels.

Return value

\Drupal\Core\StringTranslation\TranslatableMarkup[] Labels for granularities keyed by granularity.

1 call to DateRecurGranularityMap::granularityLabels()
DateRecurFilter::adminSummary in src/Plugin/views/filter/DateRecurFilter.php
Display the filter on the administrative summary.

File

src/DateRecurGranularityMap.php, line 52

Class

DateRecurGranularityMap
Granularity maps.

Namespace

Drupal\date_recur

Code

public static function granularityLabels() : array {
  return [
    'year' => new TranslatableMarkup('Absolute year'),
    'month' => new TranslatableMarkup('Absolute month'),
    'day' => new TranslatableMarkup('Absolute day'),
    'second' => new TranslatableMarkup('Datetime'),
  ];
}