You are here

public static function SettingsHelper::isInvalidCredentialAssetsUrl 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::isInvalidCredentialAssetsUrl()

Is an invalid credential Assets URL. Invalid if: 1) Missing, or 2) Not a valid URL.

Parameters

string: Credential Assets URL.

Return value

boolean True if is an invalid credential Assets URL.

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

File

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

Class

SettingsHelper
Defines the Settings Helper class.

Namespace

Drupal\acquia_lift\Service\Helper

Code

public static function isInvalidCredentialAssetsUrl($assets_url) {
  if (empty($assets_url) || !UrlHelper::isValid($assets_url)) {
    return TRUE;
  }
  return FALSE;
}