protected UrlGenerator::getInternalPathFromRoute($name, SymfonyRoute $route, $parameters = array(), $query_params = array())
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.
File
- core/lib/Drupal/Core/Routing/UrlGenerator.php, line 256
Class
- UrlGenerator
- Generates URLs from route names and parameters.
Namespace
Drupal\Core\Routing
Code
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); }
Please login to continue.