function TimestampFormatter::getRefreshIntervals
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/TimestampFormatter.php \Drupal\Core\Field\Plugin\Field\FieldFormatter\TimestampFormatter::getRefreshIntervals()
- 10 core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/TimestampFormatter.php \Drupal\Core\Field\Plugin\Field\FieldFormatter\TimestampFormatter::getRefreshIntervals()
Returns the refresh interval options for the time difference display.
Return value
\Drupal\Component\Render\MarkupInterface[] A list of refresh time intervals.
2 calls to TimestampFormatter::getRefreshIntervals()
- TimestampFormatter::settingsForm in core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldFormatter/ TimestampFormatter.php - TimestampFormatter::settingsSummary in core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldFormatter/ TimestampFormatter.php
File
-
core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldFormatter/ TimestampFormatter.php, line 363
Class
- TimestampFormatter
- Plugin implementation of the 'timestamp' formatter.
Namespace
Drupal\Core\Field\Plugin\Field\FieldFormatterCode
protected function getRefreshIntervals() : array {
return [
0 => $this->t('No refresh'),
1 => $this->formatPlural(1, '@count second', '@count seconds'),
15 => $this->formatPlural(15, '@count second', '@count seconds'),
60 => $this->formatPlural(1, '@count minute', '@count minutes'),
300 => $this->formatPlural(5, '@count minute', '@count minutes'),
600 => $this->formatPlural(10, '@count minute', '@count minutes'),
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.