public function UnroutedUrlAssembler::__construct

public UnroutedUrlAssembler::__construct(RequestStack $request_stack, OutboundPathProcessorInterface $path_processor, array $filter_protocols = ['http', 'https'])

Constructs a new unroutedUrlAssembler object.

Parameters

\Symfony\Component\HttpFoundation\RequestStack $request_stack: A request stack object.

\Drupal\Core\PathProcessor\OutboundPathProcessorInterface $path_processor: 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 41

Class

UnroutedUrlAssembler
Provides a way to build external or non Drupal local domain URLs.

Namespace

Drupal\Core\Utility

Code

public function __construct(RequestStack $request_stack, OutboundPathProcessorInterface $path_processor, array $filter_protocols = ['http', 'https']) {
  UrlHelper::setAllowedProtocols($filter_protocols);
  $this->requestStack = $request_stack;
  $this->pathProcessor = $path_processor;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Utility!UnroutedUrlAssembler.php/function/UnroutedUrlAssembler::__construct/8.1.x