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

Breadcrumb

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

function SerializerPass::bindDefaultContext

2 calls to SerializerPass::bindDefaultContext()
SerializerPass::configureNamedSerializers in vendor/symfony/serializer/DependencyInjection/SerializerPass.php
SerializerPass::process in vendor/symfony/serializer/DependencyInjection/SerializerPass.php
You can modify the container here before it is dumped to PHP code.

File

vendor/symfony/serializer/DependencyInjection/SerializerPass.php, line 100

Class

SerializerPass
Adds all services with the tags "serializer.encoder" and "serializer.normalizer" as encoders and normalizers to the "serializer" service.

Namespace

Symfony\Component\Serializer\DependencyInjection

Code

private function bindDefaultContext(ContainerBuilder $container, array $services, array $defaultContext) : void {
    foreach ($services as $id) {
        $definition = $container->getDefinition((string) $id);
        $definition->setBindings([
            'array $defaultContext' => new BoundArgument($defaultContext, false),
        ] + $definition->getBindings());
    }
}

API Navigation

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