Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Serializer.php

function Serializer::setFallbackNormalizer

Adds a secondary normalizer.

This normalizer will be attempted when JSON:API has no applicable normalizer.

Parameters

\Symfony\Component\Serializer\Normalizer\NormalizerInterface $normalizer: The secondary normalizer.

File

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

Class

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

Namespace

Drupal\jsonapi\Serializer

Code

public function setFallbackNormalizer(NormalizerInterface $normalizer) {
    $this->fallbackNormalizer = $normalizer;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal