function protected function CdnCacheTtlBase::getDateFormatter
8.x-3.x CdnCacheTtlBase.php | protected CdnCacheTtlBase::getDateFormatter() |
Retrieves the DateFormatter service.
Return value
\Drupal\Core\Datetime\DateFormatterInterface The DateFormatter service.
Class
- CdnCacheTtlBase
- Base class for "cdn_cache_ttl_*" settings.
Namespace
Drupal\bootstrap\Plugin\Setting\Advanced\CdnSource src/Plugin/Setting/Advanced/Cdn/CdnCacheTtlBase.php (line 90)
protected function getDateFormatter() {
if (!isset(static::$dateFormatter)) {
static::$dateFormatter = \Drupal::service('date.formatter');
}
return static::$dateFormatter;
}