You are here

protected function TwitterAuth::validateConfig in Open Social 8

Same name and namespace in other branches
  1. 8.9 modules/custom/social_auth_twitter/src/Plugin/Network/TwitterAuth.php \Drupal\social_auth_twitter\Plugin\Network\TwitterAuth::validateConfig()
  2. 8.2 modules/custom/social_auth_twitter/src/Plugin/Network/TwitterAuth.php \Drupal\social_auth_twitter\Plugin\Network\TwitterAuth::validateConfig()
  3. 8.3 modules/custom/social_auth_twitter/src/Plugin/Network/TwitterAuth.php \Drupal\social_auth_twitter\Plugin\Network\TwitterAuth::validateConfig()
  4. 8.4 modules/custom/social_auth_twitter/src/Plugin/Network/TwitterAuth.php \Drupal\social_auth_twitter\Plugin\Network\TwitterAuth::validateConfig()
  5. 8.5 modules/custom/social_auth_twitter/src/Plugin/Network/TwitterAuth.php \Drupal\social_auth_twitter\Plugin\Network\TwitterAuth::validateConfig()
  6. 8.6 modules/custom/social_auth_twitter/src/Plugin/Network/TwitterAuth.php \Drupal\social_auth_twitter\Plugin\Network\TwitterAuth::validateConfig()
  7. 8.7 modules/custom/social_auth_twitter/src/Plugin/Network/TwitterAuth.php \Drupal\social_auth_twitter\Plugin\Network\TwitterAuth::validateConfig()
  8. 8.8 modules/custom/social_auth_twitter/src/Plugin/Network/TwitterAuth.php \Drupal\social_auth_twitter\Plugin\Network\TwitterAuth::validateConfig()

Checks that module is configured.

Parameters

\Drupal\social_auth_twitter\Settings\TwitterAuthSettings $settings: The Twitter auth settings.

Return value

bool True if module is configured, False otherwise.

1 call to TwitterAuth::validateConfig()
TwitterAuth::initSdk in modules/custom/social_auth_twitter/src/Plugin/Network/TwitterAuth.php

File

modules/custom/social_auth_twitter/src/Plugin/Network/TwitterAuth.php, line 95

Class

TwitterAuth
Defines Social Auth Twitter Network Plugin.

Namespace

Drupal\social_auth_twitter\Plugin\Network

Code

protected function validateConfig(TwitterAuthSettings $settings) {
  $consumer_key = $settings
    ->getConsumerKey();
  $consumer_secret = $settings
    ->getConsumerSecret();
  if (!$consumer_key || !$consumer_secret) {
    $this->loggerFactory
      ->get('social_auth_twitter')
      ->error('Define Consumer Key and Consumer Secret on module settings.');
    return FALSE;
  }
  return TRUE;
}