function DateTimeNormalizer::getSupportedTypes
Same name in other branches
- 11.x core/modules/serialization/src/Normalizer/DateTimeNormalizer.php \Drupal\serialization\Normalizer\DateTimeNormalizer::getSupportedTypes()
Overrides NormalizerBase::getSupportedTypes
2 methods override DateTimeNormalizer::getSupportedTypes()
- DateTimeIso8601Normalizer::getSupportedTypes in core/
modules/ serialization/ src/ Normalizer/ DateTimeIso8601Normalizer.php - TimestampNormalizer::getSupportedTypes in core/
modules/ serialization/ src/ Normalizer/ TimestampNormalizer.php
File
-
core/
modules/ serialization/ src/ Normalizer/ DateTimeNormalizer.php, line 125
Class
- DateTimeNormalizer
- Converts values for datetime objects to RFC3339 and from common formats.
Namespace
Drupal\serialization\NormalizerCode
public function getSupportedTypes(?string $format) : array {
return [
DateTimeInterface::class => TRUE,
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.