You are here

public function SalesforceAuthProviderPluginManager::getConfig in Salesforce Suite 8.4

Same name and namespace in other branches
  1. 8.3 src/SalesforceAuthProviderPluginManager.php \Drupal\salesforce\SalesforceAuthProviderPluginManager::getConfig()
  2. 5.0.x src/SalesforceAuthProviderPluginManager.php \Drupal\salesforce\SalesforceAuthProviderPluginManager::getConfig()

Get the active auth service provider, or null if it has not been assigned.

Return value

\Drupal\salesforce\Entity\SalesforceAuthConfig|null The active service provider, or null if it has not been assigned.

Overrides SalesforceAuthProviderPluginManagerInterface::getConfig

3 calls to SalesforceAuthProviderPluginManager::getConfig()
SalesforceAuthProviderPluginManager::getProvider in src/SalesforceAuthProviderPluginManager.php
The auth provider plugin of the active service provider, or null.
SalesforceAuthProviderPluginManager::getToken in src/SalesforceAuthProviderPluginManager.php
Get the active token, or null if it has not been assigned.
SalesforceAuthProviderPluginManager::refreshToken in src/SalesforceAuthProviderPluginManager.php
Force a refresh of the active token and return the fresh token.
1 method overrides SalesforceAuthProviderPluginManager::getConfig()
TestSalesforceAuthProviderPluginManager::getConfig in src/Tests/TestSalesforceAuthProviderPluginManager.php
Get config.

File

src/SalesforceAuthProviderPluginManager.php, line 120

Class

SalesforceAuthProviderPluginManager
Auth provider plugin manager.

Namespace

Drupal\salesforce

Code

public function getConfig() {
  if (!$this->authConfig) {
    $provider_id = $this
      ->config()
      ->get('salesforce_auth_provider');
    if (empty($provider_id)) {
      return NULL;
    }
    $this->authConfig = SalesforceAuthConfig::load($provider_id);
  }
  return $this->authConfig;
}