function TwigExtension::setDateFormatter
Sets the date formatter.
Parameters
\Drupal\Core\Datetime\DateFormatter $date_formatter: The date formatter.
Return value
$this
Deprecated
in drupal:8.3.0 and is removed from drupal:9.0.0.
File
-
core/
lib/ Drupal/ Core/ Template/ TwigExtension.php, line 129
Class
- TwigExtension
- A class providing Drupal Twig extensions.
Namespace
Drupal\Core\TemplateCode
public function setDateFormatter(DateFormatterInterface $date_formatter) {
$this->dateFormatter = $date_formatter;
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.