function EntityNormalizer::getSupportedTypes

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

Overrides ComplexDataNormalizer::getSupportedTypes

2 methods override EntityNormalizer::getSupportedTypes()
ConfigEntityNormalizer::getSupportedTypes in core/modules/serialization/src/Normalizer/ConfigEntityNormalizer.php
ContentEntityNormalizer::getSupportedTypes in core/modules/serialization/src/Normalizer/ContentEntityNormalizer.php

File

core/modules/serialization/src/Normalizer/EntityNormalizer.php, line 76

Class

EntityNormalizer
Normalizes/denormalizes Drupal entity objects into an array structure.

Namespace

Drupal\serialization\Normalizer

Code

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

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