public UnroutedUrlAssemblerInterface::assemble($uri, array $options = array(), $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.
string $uri: A local URI or an external URL being linked to, such as "base:foo" or "http://example.com/foo".
array $options: (optional) An associative array of additional options, with the following elements:
bool $collect_bubbleable_metadata: (optional) Defaults to FALSE. When TRUE, both the generated URL and its associated bubbleable metadata are returned.
string|\Drupal\Core\GeneratedUrl A string containing a relative or absolute URL. When $collect_bubbleable_metadata is TRUE, a GeneratedUrl object is returned, containing the generated URL plus bubbleable metadata.
\InvalidArgumentException Thrown when the passed in path has no scheme.
public function assemble($uri, array $options = array(), $collect_bubbleable_metadata = FALSE);
© 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!UnroutedUrlAssemblerInterface.php/function/UnroutedUrlAssemblerInterface::assemble/8.1.x