function AuthenticationCollector::getSortedProviders

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

File

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

Class

AuthenticationCollector
A collector class for authentication providers.

Namespace

Drupal\Core\Authentication

Code

public function getSortedProviders() {
    if (!isset($this->sortedProviders)) {
        // Sort the providers according to priority.
        krsort($this->providerOrders);
        // Merge nested providers from $this->providers into $this->sortedProviders.
        $this->sortedProviders = array_merge(...$this->providerOrders);
    }
    return $this->sortedProviders;
}

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