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

Breadcrumb

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

function AbstractNormalizer::createChildContext

@internal

3 calls to AbstractNormalizer::createChildContext()
AbstractNormalizer::denormalizeParameter in vendor/symfony/serializer/Normalizer/AbstractNormalizer.php
@internal
AbstractObjectNormalizer::createChildContext in vendor/symfony/serializer/Normalizer/AbstractObjectNormalizer.php
Overwritten to update the cache key for the child.
AbstractObjectNormalizer::createChildContext in vendor/symfony/serializer/Normalizer/AbstractObjectNormalizer.php
Overwritten to update the cache key for the child.
1 method overrides AbstractNormalizer::createChildContext()
AbstractObjectNormalizer::createChildContext in vendor/symfony/serializer/Normalizer/AbstractObjectNormalizer.php
Overwritten to update the cache key for the child.

File

vendor/symfony/serializer/Normalizer/AbstractNormalizer.php, line 492

Class

AbstractNormalizer
Normalizer implementation.

Namespace

Symfony\Component\Serializer\Normalizer

Code

protected function createChildContext(array $parentContext, string $attribute, ?string $format) : array {
    if (isset($parentContext[self::ATTRIBUTES][$attribute])) {
        $parentContext[self::ATTRIBUTES] = $parentContext[self::ATTRIBUTES][$attribute];
    }
    else {
        unset($parentContext[self::ATTRIBUTES]);
    }
    return $parentContext;
}

API Navigation

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