You are here

class TwitterAuthSettings in Open Social 8.4

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

Returns the client information.

Hierarchy

Expanded class hierarchy of TwitterAuthSettings

3 files declare their use of TwitterAuthSettings
TwitterAuth.php in modules/custom/social_auth_twitter/src/Plugin/Network/TwitterAuth.php
TwitterAuthManager.php in modules/custom/social_auth_twitter/src/TwitterAuthManager.php
TwitterUserManager.php in modules/custom/social_auth_twitter/src/TwitterUserManager.php

File

modules/custom/social_auth_twitter/src/Settings/TwitterAuthSettings.php, line 10

Namespace

Drupal\social_auth_twitter\Settings
View source
class TwitterAuthSettings extends SettingsBase implements TwitterAuthSettingsInterface {

  /**
   * Consumer Key.
   *
   * @var string
   */
  protected $consumerKey;

  /**
   * Consumer secret.
   *
   * @var string
   */
  protected $consumerSecret;

  /**
   * {@inheritdoc}
   */
  public function getConsumerKey() {
    if (!$this->consumerKey) {
      $this->consumerKey = $this->config
        ->get('consumer_key');
    }
    return $this->consumerKey;
  }

  /**
   * {@inheritdoc}
   */
  public function getConsumerSecret() {
    if (!$this->consumerSecret) {
      $this->consumerSecret = $this->config
        ->get('consumer_secret');
    }
    return $this->consumerSecret;
  }

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

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

}

Members

Namesort descending Modifiers Type Description Overrides
TwitterAuthSettings::$consumerKey protected property Consumer Key.
TwitterAuthSettings::$consumerSecret protected property Consumer secret.
TwitterAuthSettings::getConsumerKey public function Gets the consumer key. Overrides TwitterAuthSettingsInterface::getConsumerKey
TwitterAuthSettings::getConsumerSecret public function Gets the consumer secret. Overrides TwitterAuthSettingsInterface::getConsumerSecret
TwitterAuthSettings::getSocialNetworkKey public static function Returns key-name of a social network. Overrides TwitterAuthSettingsInterface::getSocialNetworkKey
TwitterAuthSettings::isActive public function Returns status of social network. Overrides TwitterAuthSettingsInterface::isActive