You are here

public function AuthorizationProfile::getProvider in Authorization 8

Get the active provider.

Return value

\Drupal\authorization\provider\ProviderInterface|null The active provider.

2 calls to AuthorizationProfile::getProvider()
AuthorizationProfile::checkConditions in src/Entity/AuthorizationProfile.php
Check if the profile is available.
AuthorizationProfile::grantsAndRevokes in src/Entity/AuthorizationProfile.php
Perform grant and revokes.

File

src/Entity/AuthorizationProfile.php, line 238

Class

AuthorizationProfile
Defines the Authorization profile entity.

Namespace

Drupal\authorization\Entity

Code

public function getProvider() : ?ProviderInterface {
  if (!$this->provider_plugin || $this
    ->getProviderId() !== $this->provider_plugin
    ->getPluginId()) {
    $this
      ->loadProviderPlugin();
  }
  return $this->provider_plugin;
}