function AuthenticationCollector::addProvider

Same name in other branches
  1. 9 core/lib/Drupal/Core/Authentication/AuthenticationCollector.php \Drupal\Core\Authentication\AuthenticationCollector::addProvider()
  2. 8.9.x core/lib/Drupal/Core/Authentication/AuthenticationCollector.php \Drupal\Core\Authentication\AuthenticationCollector::addProvider()
  3. 11.x core/lib/Drupal/Core/Authentication/AuthenticationCollector.php \Drupal\Core\Authentication\AuthenticationCollector::addProvider()

File

core/lib/Drupal/Core/Authentication/AuthenticationCollector.php, line 41

Class

AuthenticationCollector
A collector class for authentication providers.

Namespace

Drupal\Core\Authentication

Code

public function addProvider(AuthenticationProviderInterface $provider, $provider_id, $priority = 0, $global = FALSE) {
    $this->providers[$provider_id] = $provider;
    $this->providerOrders[$priority][$provider_id] = $provider;
    // Force the providers to be re-sorted.
    $this->sortedProviders = NULL;
    if ($global) {
        $this->globalProviders[$provider_id] = TRUE;
    }
}

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