You are here

public function ContentEntityNormalizer::setSerializer in JSON:API Extras 8.2

File

src/Normalizer/ContentEntityNormalizer.php, line 18

Class

ContentEntityNormalizer
Override ContentEntityNormalizer to prepare input.

Namespace

Drupal\jsonapi_extras\Normalizer

Code

public function setSerializer(SerializerInterface $serializer) {

  // The first invocation is made by the container builder, it respects the
  // service definition. We respect this.
  // The second invocation is made by the Serializer service constructor, it
  // does not respect the service definition. We ignore this call.
  if (!isset($this->serializer)) {
    parent::setSerializer($serializer);
  }
}