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

Breadcrumb

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

function AuthenticationProviderPass::process

Overrides CompilerPassInterface::process

File

core/lib/Drupal/Core/DependencyInjection/Compiler/AuthenticationProviderPass.php, line 16

Class

AuthenticationProviderPass
Registers the authentication_providers container parameter.

Namespace

Drupal\Core\DependencyInjection\Compiler

Code

public function process(ContainerBuilder $container) : void {
    $authentication_providers = [];
    foreach ($container->findTaggedServiceIds('authentication_provider') as $service_id => $attributes) {
        $authentication_provider = $attributes[0]['provider_id'];
        if ($provider_tag = $container->getDefinition($service_id)
            ->getTag('_provider')) {
            $authentication_providers[$authentication_provider] = $provider_tag[0]['provider'];
        }
    }
    $container->setParameter('authentication_providers', $authentication_providers);
}
RSS feed
Powered by Drupal