public static function UrlHelper::setAllowedProtocols in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Component/Utility/UrlHelper.php \Drupal\Component\Utility\UrlHelper::setAllowedProtocols()
Sets the allowed protocols.
Parameters
array $protocols: An array of protocols, for example http, https and irc.
9 calls to UrlHelper::setAllowedProtocols()
- DrupalKernel::preHandle in core/
lib/ Drupal/ Core/ DrupalKernel.php - Helper method that does request related initialization.
- LinkExternalProtocolsConstraintValidatorTest::testValidate in core/
modules/ link/ tests/ src/ Unit/ Plugin/ Validation/ Constraint/ LinkExternalProtocolsConstraintValidatorTest.php - @covers ::validate @dataProvider providerValidate
- SafeMarkupTest::tearDown in core/
tests/ Drupal/ Tests/ Component/ Utility/ SafeMarkupTest.php - SafeMarkupTest::testFormat in core/
tests/ Drupal/ Tests/ Component/ Utility/ SafeMarkupTest.php - Tests string formatting with SafeMarkup::format().
- UnroutedUrlAssembler::__construct in core/
lib/ Drupal/ Core/ Utility/ UnroutedUrlAssembler.php - Constructs a new unroutedUrlAssembler object.
File
- core/
lib/ Drupal/ Component/ Utility/ UrlHelper.php, line 294 - Contains \Drupal\Component\Utility\UrlHelper.
Class
- UrlHelper
- Helper class URL based methods.
Namespace
Drupal\Component\UtilityCode
public static function setAllowedProtocols(array $protocols = array()) {
static::$allowedProtocols = $protocols;
}