public function AuthenticationCollector::addProvider in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Authentication/AuthenticationCollector.php \Drupal\Core\Authentication\AuthenticationCollector::addProvider()
Adds a provider to the array of registered providers.
Parameters
\Drupal\Core\Authentication\AuthenticationProviderInterface $provider: The provider object.
string $provider_id: Identifier of the provider.
int $priority: (optional) The provider's priority.
bool $global: (optional) TRUE if the provider is to be applied globally on all routes. Defaults to FALSE.
Overrides AuthenticationCollectorInterface::addProvider
File
- core/
lib/ Drupal/ Core/ Authentication/ AuthenticationCollector.php, line 46 - Contains \Drupal\Core\Authentication\AuthenticationCollector.
Class
- AuthenticationCollector
- A collector class for authentication providers.
Namespace
Drupal\Core\AuthenticationCode
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;
}
}