function TimestampNormalizer::getSupportedTypes

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

Overrides DateTimeNormalizer::getSupportedTypes

File

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

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.