function UnroutedUrlAssembler::__construct
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Utility/UnroutedUrlAssembler.php \Drupal\Core\Utility\UnroutedUrlAssembler::__construct()
- 10 core/lib/Drupal/Core/Utility/UnroutedUrlAssembler.php \Drupal\Core\Utility\UnroutedUrlAssembler::__construct()
- 9 core/lib/Drupal/Core/Utility/UnroutedUrlAssembler.php \Drupal\Core\Utility\UnroutedUrlAssembler::__construct()
- 8.9.x core/lib/Drupal/Core/Utility/UnroutedUrlAssembler.php \Drupal\Core\Utility\UnroutedUrlAssembler::__construct()
Constructs a new unroutedUrlAssembler object.
Parameters
\Symfony\Component\HttpFoundation\RequestStack $requestStack: A request stack object.
\Drupal\Core\PathProcessor\OutboundPathProcessorInterface $pathProcessor: The output path processor.
string[] $filter_protocols: (optional) An array of protocols allowed for URL generation.
File
-
core/
lib/ Drupal/ Core/ Utility/ UnroutedUrlAssembler.php, line 28
Class
- UnroutedUrlAssembler
- Provides a way to build external or non Drupal local domain URLs.
Namespace
Drupal\Core\UtilityCode
public function __construct(protected RequestStack $requestStack, protected OutboundPathProcessorInterface $pathProcessor, array $filter_protocols = [
'http',
'https',
]) {
UrlHelper::setAllowedProtocols($filter_protocols);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.