function FieldNormalizer::getSupportedTypes

Same name in this branch
  1. 10 core/modules/serialization/src/Normalizer/FieldNormalizer.php \Drupal\serialization\Normalizer\FieldNormalizer::getSupportedTypes()
Same name and namespace in other branches
  1. 11.x core/modules/jsonapi/src/Normalizer/FieldNormalizer.php \Drupal\jsonapi\Normalizer\FieldNormalizer::getSupportedTypes()
  2. 11.x core/modules/serialization/src/Normalizer/FieldNormalizer.php \Drupal\serialization\Normalizer\FieldNormalizer::getSupportedTypes()
  3. main core/modules/jsonapi/src/Normalizer/FieldNormalizer.php \Drupal\jsonapi\Normalizer\FieldNormalizer::getSupportedTypes()
  4. main core/modules/serialization/src/Normalizer/FieldNormalizer.php \Drupal\serialization\Normalizer\FieldNormalizer::getSupportedTypes()

Overrides NormalizerBase::getSupportedTypes

1 method overrides FieldNormalizer::getSupportedTypes()
EntityReferenceFieldNormalizer::getSupportedTypes in core/modules/jsonapi/src/Normalizer/EntityReferenceFieldNormalizer.php

File

core/modules/jsonapi/src/Normalizer/FieldNormalizer.php, line 104

Class

FieldNormalizer
Converts the Drupal field structure to a JSON:API array structure.

Namespace

Drupal\jsonapi\Normalizer

Code

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

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