public function DateTimeNormalizer::__construct in Drupal 8
Same name and namespace in other branches
- 9 core/modules/serialization/src/Normalizer/DateTimeNormalizer.php \Drupal\serialization\Normalizer\DateTimeNormalizer::__construct()
Constructs a new DateTimeNormalizer instance.
Parameters
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: A config factory for retrieving required config objects.
File
- core/
modules/ serialization/ src/ Normalizer/ DateTimeNormalizer.php, line 50
Class
- DateTimeNormalizer
- Converts values for datetime objects to RFC3339 and from common formats.
Namespace
Drupal\serialization\NormalizerCode
public function __construct(ConfigFactoryInterface $config_factory) {
$this->systemDateConfig = $config_factory
->get('system.date');
}