TwigExtension::setDateFormatter
public function TwigExtension::setDateFormatter
public TwigExtension::setDateFormatter(DateFormatterInterface $date_formatter)
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 114
Class
- TwigExtension
- A class providing Drupal Twig extensions.
Namespace
Drupal\Core\TemplateCode
public function setDateFormatter(DateFormatterInterface $date_formatter) { $this->dateFormatter = $date_formatter; return $this; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Template!TwigExtension.php/function/TwigExtension::setDateFormatter/8.1.x