NullGenerator::getInternalPathFromRoute

protected NullGenerator::getInternalPathFromRoute($name, Route $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.

Overrides UrlGenerator::getInternalPathFromRoute

File

core/lib/Drupal/Core/Routing/NullGenerator.php, line 55

Class

NullGenerator
No-op implementation of a Url Generator, needed for backward compatibility.

Namespace

Drupal\Core\Routing

Code

protected function getInternalPathFromRoute($name, Route $route, $parameters = array(), $query_params = array()) {
  return $route->getPath();
}
doc_Drupal
2016-10-29 09:32:09
Comments
Leave a Comment

Please login to continue.