function Serializer::supportsNormalization

Same name in other branches
  1. 9 core/modules/jsonapi/src/Serializer/Serializer.php \Drupal\jsonapi\Serializer\Serializer::supportsNormalization()
  2. 8.9.x core/modules/jsonapi/src/Serializer/Serializer.php \Drupal\jsonapi\Serializer\Serializer::supportsNormalization()
  3. 11.x core/modules/jsonapi/src/Serializer/Serializer.php \Drupal\jsonapi\Serializer\Serializer::supportsNormalization()

File

core/modules/jsonapi/src/Serializer/Serializer.php, line 83

Class

Serializer
Overrides the Symfony serializer to cordon off our incompatible normalizers.

Namespace

Drupal\jsonapi\Serializer

Code

public function supportsNormalization($data, ?string $format = NULL, array $context = []) : bool {
    return $this->selfSupportsNormalization($data, $format, $context) || $this->fallbackNormalizer
        ->supportsNormalization($data, $format, $context);
}

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