protected function 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();
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Routing!NullGenerator.php/function/NullGenerator::getInternalPathFromRoute/8.1.x