You are here

public static function SettingsHelper::isInvalidCredentialSiteId in Acquia Lift Connector 8.4

Same name and namespace in other branches
  1. 8.3 src/Service/Helper/SettingsHelper.php \Drupal\acquia_lift\Service\Helper\SettingsHelper::isInvalidCredentialSiteId()

Is an invalid credential Site ID. Invalid if: 1) Missing, or 2) Not alphanumerical.

Parameters

string: Credential Site ID.

Return value

boolean True if is an invalid credential Site ID.

3 calls to SettingsHelper::isInvalidCredentialSiteId()
AdminSettingsForm::preValidateData in src/Form/AdminSettingsForm.php
Pre-validate data.
AdminSettingsForm::validateCredentialValues in src/Form/AdminSettingsForm.php
SettingsHelperTest::testIsInvalidCredentialSiteId in tests/src/Unit/Service/Helper/SettingsHelperTest.php
Tests the isInvalidCredentialSiteId() method.

File

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

Class

SettingsHelper
Defines the Settings Helper class.

Namespace

Drupal\acquia_lift\Service\Helper

Code

public static function isInvalidCredentialSiteId($site_id) {
  if (empty($site_id)) {
    return TRUE;
  }
  return FALSE;
}