Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. UrlHelper.php

function UrlHelper::setAllowedProtocols

Sets the allowed protocols.

Parameters

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

3 calls to UrlHelper::setAllowedProtocols()
DrupalKernel::preHandle in core/lib/Drupal/Core/DrupalKernel.php
Helper method that does request related initialization.
UnroutedUrlAssembler::__construct in core/lib/Drupal/Core/Utility/UnroutedUrlAssembler.php
Constructs a new unroutedUrlAssembler object.
UrlGenerator::__construct in core/lib/Drupal/Core/Routing/UrlGenerator.php
Constructs a new generator object.

File

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

Class

UrlHelper
Helper class URL based methods.

Namespace

Drupal\Component\Utility

Code

public static function setAllowedProtocols(array $protocols = []) {
    static::$allowedProtocols = $protocols;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal