You are here

private function AuthorizationProfile::loadProviderPlugin in Authorization 8

Load the provider plugin.

1 call to AuthorizationProfile::loadProviderPlugin()
AuthorizationProfile::getProvider in src/Entity/AuthorizationProfile.php
Get the active provider.

File

src/Entity/AuthorizationProfile.php, line 261

Class

AuthorizationProfile
Defines the Authorization profile entity.

Namespace

Drupal\authorization\Entity

Code

private function loadProviderPlugin() : void {
  $config = $this
    ->getProviderConfig();
  $config['profile'] = $this;
  try {
    $this->provider_plugin = $this->provider_plugin_manager
      ->createInstance($this
      ->getProviderId(), $config);
  } catch (\Exception $e) {
    $this->logger
      ->critical('The provider with ID "@provider" could not be retrieved for profile %profile.', [
      '@provider' => $this
        ->getProviderId(),
      '%profile' => $this
        ->label(),
    ]);
  }
}