public function PathBasedGeneratorInterface::setBaseUrl

Sets the baseUrl property.

This property is made up of scheme, host and base_path, e.g. 'http://www.example.com/mydrupalinstall/'

The base url is usually set by the request but we allow it to be set independent of the request so that code that calls url() outside the context of a request can use the global $base_url variable to set this value.

@todo Remove this once the url() function no longer supports being called when there is no request.

The base url to use for url generation.

1 method overrides PathBasedGeneratorInterface::setBaseUrl()

File

drupal/core/lib/Drupal/Core/Routing/PathBasedGeneratorInterface.php, line 56
Contains Drupal\Core\Routing\PathBasedGeneratorInterface.

Class

PathBasedGeneratorInterface
Defines an interface for generating a url from a path as opposed to a route.

Namespace

Drupal\Core\Routing

Code

public function setBaseUrl($url);