You are here

protected function FacebookAuth::validateConfig in Open Social 8.3

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

Checks that module is configured.

Parameters

\Drupal\social_auth_facebook\Settings\FacebookAuthSettings $settings: The Facebook auth settings.

Return value

bool True if module is configured, False otherwise.

1 call to FacebookAuth::validateConfig()
FacebookAuth::initSdk in modules/custom/social_auth_facebook/src/Plugin/Network/FacebookAuth.php
Returns an instance of sdk.

File

modules/custom/social_auth_facebook/src/Plugin/Network/FacebookAuth.php, line 105

Class

FacebookAuth
Defines a Network Plugin for Social Auth Facebook.

Namespace

Drupal\social_auth_facebook\Plugin\Network

Code

protected function validateConfig(FacebookAuthSettings $settings) {
  $app_id = $settings
    ->getAppId();
  $app_secret = $settings
    ->getAppSecret();
  $graph_version = $settings
    ->getGraphVersion();
  if (!$app_id || !$app_secret || !$graph_version) {
    $this->loggerFactory
      ->get('social_auth_facebook')
      ->error('Define App ID and App Secret on module settings.');
    return FALSE;
  }
  return TRUE;
}