You are here

class GoogleAuthSettings in Social Auth Google 3.x

Same name and namespace in other branches
  1. 8.2 src/Settings/GoogleAuthSettings.php \Drupal\social_auth_google\Settings\GoogleAuthSettings
  2. 8 src/Settings/GoogleAuthSettings.php \Drupal\social_auth_google\Settings\GoogleAuthSettings

Defines methods to get Social Auth Google settings.

Hierarchy

Expanded class hierarchy of GoogleAuthSettings

1 file declares its use of GoogleAuthSettings
GoogleAuth.php in src/Plugin/Network/GoogleAuth.php

File

src/Settings/GoogleAuthSettings.php, line 10

Namespace

Drupal\social_auth_google\Settings
View source
class GoogleAuthSettings extends SettingsBase implements GoogleAuthSettingsInterface {

  /**
   * Client ID.
   *
   * @var string
   */
  protected $clientId;

  /**
   * Client secret.
   *
   * @var string
   */
  protected $clientSecret;

  /**
   * Restricted domain.
   *
   * @var string
   */
  protected $restrictedDomain;

  /**
   * {@inheritdoc}
   */
  public function getClientId() {
    if (!$this->clientId) {
      $this->clientId = $this->config
        ->get('client_id');
    }
    return $this->clientId;
  }

  /**
   * {@inheritdoc}
   */
  public function getClientSecret() {
    if (!$this->clientSecret) {
      $this->clientSecret = $this->config
        ->get('client_secret');
    }
    return $this->clientSecret;
  }

  /**
   * {@inheritdoc}
   */
  public function getRestrictedDomain() {
    if (!$this->restrictedDomain) {
      $this->restrictedDomain = $this->config
        ->get('restricted_domain');
    }
    return $this->restrictedDomain;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
GoogleAuthSettings::$clientId protected property Client ID.
GoogleAuthSettings::$clientSecret protected property Client secret.
GoogleAuthSettings::$restrictedDomain protected property Restricted domain.
GoogleAuthSettings::getClientId public function Gets the client ID. Overrides GoogleAuthSettingsInterface::getClientId
GoogleAuthSettings::getClientSecret public function Gets the client secret. Overrides GoogleAuthSettingsInterface::getClientSecret
GoogleAuthSettings::getRestrictedDomain public function Gets the restricted domain. Overrides GoogleAuthSettingsInterface::getRestrictedDomain
SettingsBase::$config protected property The configuration object containing the data from the configuration form.
SettingsBase::factory public static function Factory method to create a new settings object. Overrides SettingsInterface::factory
SettingsBase::getConfig public function Gets the configuration object. Overrides SettingsInterface::getConfig
SettingsBase::__construct public function Creates a new settings object.