You are here

public function SalesforceAuthConfig::getPlugin in Salesforce Suite 8.3

Same name and namespace in other branches
  1. 8.4 src/Entity/SalesforceAuthConfig.php \Drupal\salesforce\Entity\SalesforceAuthConfig::getPlugin()
  2. 5.0.x src/Entity/SalesforceAuthConfig.php \Drupal\salesforce\Entity\SalesforceAuthConfig::getPlugin()

Plugin getter.

Return value

\Drupal\salesforce\SalesforceAuthProviderInterface|null The auth provider plugin, or null.

1 call to SalesforceAuthConfig::getPlugin()
SalesforceAuthConfig::getLoginUrl in src/Entity/SalesforceAuthConfig.php

File

src/Entity/SalesforceAuthConfig.php, line 93

Class

SalesforceAuthConfig
Defines a Salesforce Auth entity.

Namespace

Drupal\salesforce\Entity

Code

public function getPlugin() {
  $settings = $this->provider_settings ?: [];
  $settings += [
    'id' => $this
      ->id(),
  ];
  return $this->provider ? $this
    ->authManager()
    ->createInstance($this->provider, $settings) : NULL;
}