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

Breadcrumb

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

function SerializerPass::findNameConverterIndex

1 call to SerializerPass::findNameConverterIndex()
SerializerPass::buildChildDefinitions in vendor/symfony/serializer/DependencyInjection/SerializerPass.php

File

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

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 findNameConverterIndex(ContainerBuilder $container, string $id) : int|string|null {
    foreach ($container->getDefinition($id)
        ->getArguments() as $index => $argument) {
        if ($argument instanceof Reference && self::NAME_CONVERTER_METADATA_AWARE_ID === (string) $argument) {
            return $index;
        }
    }
    return null;
}

API Navigation

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