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

Breadcrumb

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

function ContextBuilderTrait::with

72 calls to ContextBuilderTrait::with()
AbstractNormalizerContextBuilder::withAllowExtraAttributes in vendor/symfony/serializer/Context/Normalizer/AbstractNormalizerContextBuilder.php
If AbstractNormalizer::ATTRIBUTES are specified, and the source has fields that are not part of that list, configures whether to ignore those attributes or throw an ExtraAttributesException.
AbstractNormalizerContextBuilder::withAttributes in vendor/symfony/serializer/Context/Normalizer/AbstractNormalizerContextBuilder.php
Configures attributes to (de)normalize.
AbstractNormalizerContextBuilder::withCallbacks in vendor/symfony/serializer/Context/Normalizer/AbstractNormalizerContextBuilder.php
Configures an hashmap of field name => callable to normalize this field.
AbstractNormalizerContextBuilder::withCircularReferenceHandler in vendor/symfony/serializer/Context/Normalizer/AbstractNormalizerContextBuilder.php
Configures an handler to call when a circular reference has been detected.
AbstractNormalizerContextBuilder::withCircularReferenceLimit in vendor/symfony/serializer/Context/Normalizer/AbstractNormalizerContextBuilder.php
Configures how many loops of circular reference to allow while normalizing.

... See full list

File

vendor/symfony/serializer/Context/ContextBuilderTrait.php, line 24

Class

ContextBuilderTrait
@author Mathias Arlaud <mathias.arlaud@gmail.com>

Namespace

Symfony\Component\Serializer\Context

Code

protected function with(string $key, mixed $value) : static {
    $instance = new static();
    $instance->context = array_merge($this->context, [
        $key => $value,
    ]);
    return $instance;
}

API Navigation

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