function TimestampNormalizer::getSupportedTypes

Same name and namespace in other branches
  1. 10 core/modules/serialization/src/Normalizer/TimestampNormalizer.php \Drupal\serialization\Normalizer\TimestampNormalizer::getSupportedTypes()

Overrides DateTimeNormalizer::getSupportedTypes

File

core/modules/serialization/src/Normalizer/TimestampNormalizer.php, line 47

Class

TimestampNormalizer
Converts values for the Timestamp data type to and from common formats.

Namespace

Drupal\serialization\Normalizer

Code

public function getSupportedTypes(?string $format) : array {
  return [
    Timestamp::class => TRUE,
  ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.