You are here

class FacebookAuthSettings in Open Social 8.5

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

Defines methods to get Social Auth Facebook app settings.

Hierarchy

Expanded class hierarchy of FacebookAuthSettings

3 files declare their use of FacebookAuthSettings
FacebookAuth.php in modules/custom/social_auth_facebook/src/Plugin/Network/FacebookAuth.php
FacebookAuthManager.php in modules/custom/social_auth_facebook/src/FacebookAuthManager.php
FacebookUserManager.php in modules/custom/social_auth_facebook/src/FacebookUserManager.php

File

modules/custom/social_auth_facebook/src/Settings/FacebookAuthSettings.php, line 10

Namespace

Drupal\social_auth_facebook\Settings
View source
class FacebookAuthSettings extends SettingsBase implements FacebookAuthSettingsInterface {

  /**
   * Facebook Application ID.
   *
   * @var string
   */
  protected $appId;

  /**
   * Facebook Application Secret.
   *
   * @var string
   */
  protected $appSecret;

  /**
   * The default graph version.
   *
   * @var string
   */
  protected $graphVersion;

  /**
   * The default access token.
   *
   * @var string
   */
  protected $defaultToken;

  /**
   * {@inheritdoc}
   */
  public function getAppId() {
    if (!$this->appId) {
      $this->appId = $this->config
        ->get('app_id');
    }
    return $this->appId;
  }

  /**
   * {@inheritdoc}
   */
  public function getAppSecret() {
    if (!$this->appSecret) {
      $this->appSecret = $this->config
        ->get('app_secret');
    }
    return $this->appSecret;
  }

  /**
   * {@inheritdoc}
   */
  public function getGraphVersion() {
    if (!$this->graphVersion) {
      $this->graphVersion = $this->config
        ->get('graph_version');
    }
    return $this->graphVersion;
  }

  /**
   * {@inheritdoc}
   */
  public function isActive() {
    return (bool) $this->config
      ->get('status');
  }

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

}

Members

Namesort descending Modifiers Type Description Overrides
FacebookAuthSettings::$appId protected property Facebook Application ID.
FacebookAuthSettings::$appSecret protected property Facebook Application Secret.
FacebookAuthSettings::$defaultToken protected property The default access token.
FacebookAuthSettings::$graphVersion protected property The default graph version.
FacebookAuthSettings::getAppId public function Gets the app ID. Overrides FacebookAuthSettingsInterface::getAppId
FacebookAuthSettings::getAppSecret public function Gets the app secret. Overrides FacebookAuthSettingsInterface::getAppSecret
FacebookAuthSettings::getGraphVersion public function Gets the default graph version. Overrides FacebookAuthSettingsInterface::getGraphVersion
FacebookAuthSettings::getSocialNetworkKey public static function Returns key-name of a social network. Overrides FacebookAuthSettingsInterface::getSocialNetworkKey
FacebookAuthSettings::isActive public function Returns status of social network. Overrides FacebookAuthSettingsInterface::isActive