You are here

class GoogleAuthSettings in Open Social 8.5

Same name and namespace in other branches
  1. 8.9 modules/custom/social_auth_google/src/Settings/GoogleAuthSettings.php \Drupal\social_auth_google\Settings\GoogleAuthSettings
  2. 8 modules/custom/social_auth_google/src/Settings/GoogleAuthSettings.php \Drupal\social_auth_google\Settings\GoogleAuthSettings
  3. 8.2 modules/custom/social_auth_google/src/Settings/GoogleAuthSettings.php \Drupal\social_auth_google\Settings\GoogleAuthSettings
  4. 8.3 modules/custom/social_auth_google/src/Settings/GoogleAuthSettings.php \Drupal\social_auth_google\Settings\GoogleAuthSettings
  5. 8.4 modules/custom/social_auth_google/src/Settings/GoogleAuthSettings.php \Drupal\social_auth_google\Settings\GoogleAuthSettings
  6. 8.6 modules/custom/social_auth_google/src/Settings/GoogleAuthSettings.php \Drupal\social_auth_google\Settings\GoogleAuthSettings
  7. 8.7 modules/custom/social_auth_google/src/Settings/GoogleAuthSettings.php \Drupal\social_auth_google\Settings\GoogleAuthSettings
  8. 8.8 modules/custom/social_auth_google/src/Settings/GoogleAuthSettings.php \Drupal\social_auth_google\Settings\GoogleAuthSettings

Defines methods to get Social Auth Google app settings.

Hierarchy

Expanded class hierarchy of GoogleAuthSettings

3 files declare their use of GoogleAuthSettings
GoogleAuth.php in modules/custom/social_auth_google/src/Plugin/Network/GoogleAuth.php
GoogleAuthManager.php in modules/custom/social_auth_google/src/GoogleAuthManager.php
GoogleUserManager.php in modules/custom/social_auth_google/src/GoogleUserManager.php

File

modules/custom/social_auth_google/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;

  /**
   * {@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 isActive() {
    return (bool) $this->config
      ->get('status');
  }

  /**
   * {@inheritdoc}
   */
  public static function getSocialNetworkKey() {
    return 'google';
  }

}

Members

Namesort descending Modifiers Type Description Overrides
GoogleAuthSettings::$clientId protected property Client ID.
GoogleAuthSettings::$clientSecret protected property Client secret.
GoogleAuthSettings::getClientId public function Gets the client ID. Overrides GoogleAuthSettingsInterface::getClientId
GoogleAuthSettings::getClientSecret public function Gets the client secret. Overrides GoogleAuthSettingsInterface::getClientSecret
GoogleAuthSettings::getSocialNetworkKey public static function Returns key-name of a social network. Overrides GoogleAuthSettingsInterface::getSocialNetworkKey
GoogleAuthSettings::isActive public function Returns status of social network. Overrides GoogleAuthSettingsInterface::isActive