You are here

public function SalesforceAuthConfig::getPlugin in Salesforce Suite 8.4

Same name and namespace in other branches
  1. 8.3 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.

Throws

\Drupal\Component\Plugin\Exception\PluginException

1 call to SalesforceAuthConfig::getPlugin()
SalesforceAuthConfig::getCredentials in src/Entity/SalesforceAuthConfig.php
Get credentials.

File

src/Entity/SalesforceAuthConfig.php, line 112

Class

SalesforceAuthConfig
Defines a Salesforce Auth entity.

Namespace

Drupal\salesforce\Entity

Code

public function getPlugin() {
  if (!$this->plugin) {
    $this->plugin = $this->provider ? $this
      ->authManager()
      ->createInstance($this->provider, $this
      ->getProviderSettings()) : NULL;
  }
  return $this->plugin;
}