UnroutedUrlAssembler
class UnroutedUrlAssembler implements UnroutedUrlAssemblerInterface (View source)
Provides a way to build external or non Drupal local domain URLs.
It takes into account configured safe HTTP protocols.
Properties
| protected RequestStack | $requestStack | A request stack object. |
|
| protected OutboundPathProcessorInterface | $pathProcessor | The outbound path processor. |
Methods
__construct(RequestStack $request_stack, OutboundPathProcessorInterface $path_processor, array $filter_protocols = ['http', 'https'])
Constructs a new unroutedUrlAssembler object.
string|GeneratedUrl
assemble(string $uri, array $options = [], bool $collect_bubbleable_metadata = FALSE)
Builds a domain-local or external URL from a URI.
buildExternalUrl($uri, array $options = [], $collect_bubbleable_metadata = FALSE)
{@inheritdoc}
buildLocalUrl($uri, array $options = [], $collect_bubbleable_metadata = FALSE)
{@inheritdoc}
addOptionDefaults(array $options)
Merges in default defaults.
Details
__construct(RequestStack $request_stack, OutboundPathProcessorInterface $path_processor, array $filter_protocols = ['http', 'https'])
Constructs a new unroutedUrlAssembler object.
string|GeneratedUrl
assemble(string $uri, array $options = [], bool $collect_bubbleable_metadata = FALSE)
Builds a domain-local or external URL from a URI.
For actual implementations the logic probably has to be split up between domain-local URIs and external URLs.
protected
buildExternalUrl($uri, array $options = [], $collect_bubbleable_metadata = FALSE)
{@inheritdoc}
protected
buildLocalUrl($uri, array $options = [], $collect_bubbleable_metadata = FALSE)
{@inheritdoc}
protected
addOptionDefaults(array $options)
Merges in default defaults.