function AuthenticationProviderPass::process

Same name in other branches
  1. 9 core/lib/Drupal/Core/DependencyInjection/Compiler/AuthenticationProviderPass.php \Drupal\Core\DependencyInjection\Compiler\AuthenticationProviderPass::process()
  2. 10 core/lib/Drupal/Core/DependencyInjection/Compiler/AuthenticationProviderPass.php \Drupal\Core\DependencyInjection\Compiler\AuthenticationProviderPass::process()
  3. 11.x core/lib/Drupal/Core/DependencyInjection/Compiler/AuthenticationProviderPass.php \Drupal\Core\DependencyInjection\Compiler\AuthenticationProviderPass::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) {
    $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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.