You are here

public function TwigExtension::setDateFormatter in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Template/TwigExtension.php \Drupal\Core\Template\TwigExtension::setDateFormatter()

Sets the date formatter.

Parameters

\Drupal\Core\Datetime\DateFormatter $date_formatter: The date formatter.

Return value

$this

File

core/lib/Drupal/Core/Template/TwigExtension.php, line 121
Contains \Drupal\Core\Template\TwigExtension.

Class

TwigExtension
A class providing Drupal Twig extensions.

Namespace

Drupal\Core\Template

Code

public function setDateFormatter(DateFormatter $date_formatter) {
  $this->dateFormatter = $date_formatter;
  return $this;
}