function UrlHelper::getAllowedProtocols

Same name in other branches
  1. 9 core/lib/Drupal/Component/Utility/UrlHelper.php \Drupal\Component\Utility\UrlHelper::getAllowedProtocols()
  2. 8.9.x core/lib/Drupal/Component/Utility/UrlHelper.php \Drupal\Component\Utility\UrlHelper::getAllowedProtocols()
  3. 10 core/lib/Drupal/Component/Utility/UrlHelper.php \Drupal\Component\Utility\UrlHelper::getAllowedProtocols()

Gets the allowed protocols.

Return value

array An array of protocols, for example http, https and irc.

1 call to UrlHelper::getAllowedProtocols()
LinkExternalProtocolsConstraintValidator::validate in core/modules/link/src/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidator.php

File

core/lib/Drupal/Component/Utility/UrlHelper.php, line 349

Class

UrlHelper
Helper class URL based methods.

Namespace

Drupal\Component\Utility

Code

public static function getAllowedProtocols() {
    return static::$allowedProtocols;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.