You are here

private function AuthorizationProfile::loadConsumerPlugin in Authorization 8

Load the consumer plugin.

1 call to AuthorizationProfile::loadConsumerPlugin()
AuthorizationProfile::getConsumer in src/Entity/AuthorizationProfile.php
Get the active consumer.

File

src/Entity/AuthorizationProfile.php, line 279

Class

AuthorizationProfile
Defines the Authorization profile entity.

Namespace

Drupal\authorization\Entity

Code

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