You are here

public static function SettingsHelper::isInvalidCredential in Acquia Lift Connector 8.3

Same name and namespace in other branches
  1. 8.4 src/Service/Helper/SettingsHelper.php \Drupal\acquia_lift\Service\Helper\SettingsHelper::isInvalidCredential()
  2. 8 src/Service/Helper/SettingsHelper.php \Drupal\acquia_lift\Service\Helper\SettingsHelper::isInvalidCredential()

Is an invalid credential.

Parameters

array: Credential settings array.

Return value

boolean True if is an invalid credential.

4 calls to SettingsHelper::isInvalidCredential()
acquia_lift_requirements in ./acquia_lift.install
Implements hook_requirements().
AdminSettingsForm::buildCredentialForm in src/Form/AdminSettingsForm.php
Build credential form.
PathContext::shouldAttach in src/Service/Context/PathContext.php
Should attach.
SettingsHelperTest::testIsInvalidCredential in tests/src/Unit/Service/Helper/SettingsHelperTest.php
Tests the isInvalidCredential() method.

File

src/Service/Helper/SettingsHelper.php, line 27

Class

SettingsHelper
Defines the Settings Helper class.

Namespace

Drupal\acquia_lift\Service\Helper

Code

public static function isInvalidCredential($credential_settings) {
  if (SELF::isInvalidCredentialAccountId($credential_settings['account_id']) || SELF::isInvalidCredentialSiteId($credential_settings['site_id']) || SELF::isInvalidCredentialAssetsUrl($credential_settings['assets_url']) || isset($credential_settings['decision_api_url']) && SELF::isInvalidCredentialDecisionAPIUrl($credential_settings['decision_api_url']) || isset($credential_settings['oauth_url']) && SELF::isInvalidCredentialOauthUrl($credential_settings['oauth_url'])) {
    return TRUE;
  }
  return FALSE;
}