public function PathBasedGeneratorInterface::setScriptPath

Sets the scriptPath property.

The script path is usually set by the request and is either 'index.php' or the empty string, depending on whether the request path actually contains the script path or not. 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 $script_path variable to set this value.

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

The script path to use for url generation.

1 method overrides PathBasedGeneratorInterface::setScriptPath()

File

drupal/core/lib/Drupal/Core/Routing/PathBasedGeneratorInterface.php, line 91
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 setScriptPath($path);