You are here

protected function TwigExtensionBase::getDateFormatter in Bamboo Twig 8.5

Same name and namespace in other branches
  1. 8.2 src/TwigExtension/TwigExtensionBase.php \Drupal\bamboo_twig\TwigExtension\TwigExtensionBase::getDateFormatter()
  2. 8.3 src/TwigExtension/TwigExtensionBase.php \Drupal\bamboo_twig\TwigExtension\TwigExtensionBase::getDateFormatter()
  3. 8.4 src/TwigExtension/TwigExtensionBase.php \Drupal\bamboo_twig\TwigExtension\TwigExtensionBase::getDateFormatter()

Provides a service to handle various date related functionality.

Return value

\Drupal\Core\Datetime\DateFormatterInterface The Date Formatter service.

File

src/TwigExtension/TwigExtensionBase.php, line 207

Class

TwigExtensionBase
Provides a Twig Extension Lazy Service Injection.

Namespace

Drupal\bamboo_twig\TwigExtension

Code

protected function getDateFormatter() {
  return $this->container
    ->get('date.formatter');
}