protected function UrlGenerator::getInternalPathFromRoute in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Routing/UrlGenerator.php \Drupal\Core\Routing\UrlGenerator::getInternalPathFromRoute()
Gets the path of a route.
Parameters
$name: The route name or other debug message.
\Symfony\Component\Routing\Route $route: The route object.
array $parameters: An array of parameters as passed to \Symfony\Component\Routing\Generator\UrlGeneratorInterface::generate().
array $query_params: An array of query string parameter, which will get any extra values from $parameters merged in.
Return value
string The url path corresponding to the route, without the base path.
2 calls to UrlGenerator::getInternalPathFromRoute()
- UrlGenerator::generateFromRoute in core/
lib/ Drupal/ Core/ Routing/ UrlGenerator.php - Generates a URL or path for a specific route based on the given parameters.
- UrlGenerator::getPathFromRoute in core/
lib/ Drupal/ Core/ Routing/ UrlGenerator.php - Gets the internal path (system path) for a route.
1 method overrides UrlGenerator::getInternalPathFromRoute()
- NullGenerator::getInternalPathFromRoute in core/
lib/ Drupal/ Core/ Routing/ NullGenerator.php - Gets the path of a route.
File
- core/
lib/ Drupal/ Core/ Routing/ UrlGenerator.php, line 264 - Contains \Drupal\Core\Routing\UrlGenerator.
Class
- UrlGenerator
- Generates URLs from route names and parameters.
Namespace
Drupal\Core\RoutingCode
protected function getInternalPathFromRoute($name, SymfonyRoute $route, $parameters = array(), $query_params = array()) {
// The Route has a cache of its own and is not recompiled as long as it does
// not get modified.
$compiledRoute = $route
->compile();
return $this
->doGenerate($compiledRoute
->getVariables(), $route
->getDefaults(), $compiledRoute
->getTokens(), $parameters, $query_params, $name);
}