W3cubDocs

/Drupal 8

public function UrlGeneratorInterface::getPathFromRoute

public UrlGeneratorInterface::getPathFromRoute($name, $parameters = array())

Gets the internal path (system path) for a route.

Parameters

string|\Symfony\Component\Routing\Route $name: The route name or a route object.

array $parameters: An array of parameters as passed to \Symfony\Component\Routing\Generator\UrlGeneratorInterface::generate().

Return value

string The internal Drupal path corresponding to the route.

File

core/lib/Drupal/Core/Routing/UrlGeneratorInterface.php, line 26

Class

UrlGeneratorInterface
Defines an interface for generating a url from a route or system path.

Namespace

Drupal\Core\Routing

Code

public function getPathFromRoute($name, $parameters = array());

© 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!UrlGeneratorInterface.php/function/UrlGeneratorInterface::getPathFromRoute/8.1.x