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

Breadcrumb

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

function AbstractNormalizerContextBuilder::withCircularReferenceLimit

Configures how many loops of circular reference to allow while normalizing.

The value 1 means that when we encounter the same object a second time, we consider that a circular reference.

You can raise this value for special cases, e.g. in combination with the max depth setting of the object normalizer.

Must be strictly positive.

Parameters

positive-int|null $circularReferenceLimit:

File

vendor/symfony/serializer/Context/Normalizer/AbstractNormalizerContextBuilder.php, line 41

Class

AbstractNormalizerContextBuilder
A helper providing autocompletion for available AbstractNormalizer options.

Namespace

Symfony\Component\Serializer\Context\Normalizer

Code

public function withCircularReferenceLimit(?int $circularReferenceLimit) : static {
    return $this->with(AbstractNormalizer::CIRCULAR_REFERENCE_LIMIT, $circularReferenceLimit);
}

API Navigation

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