function UrlGeneratorInterface::getPathFromRoute
Gets the internal path (system path) for a route.
Parameters
string $name: The route name.
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. This string is not urlencoded and will be an empty string for the front page.
3 methods override UrlGeneratorInterface::getPathFromRoute()
- MetadataBubblingUrlGenerator::getPathFromRoute in core/
lib/ Drupal/ Core/ Render/ MetadataBubblingUrlGenerator.php - SupernovaGenerator::getPathFromRoute in core/
modules/ help/ tests/ modules/ help_test/ src/ SupernovaGenerator.php - UrlGenerator::getPathFromRoute in core/
lib/ Drupal/ Core/ Routing/ UrlGenerator.php
File
-
core/
lib/ Drupal/ Core/ Routing/ UrlGeneratorInterface.php, line 27
Class
- UrlGeneratorInterface
- Defines an interface for generating a URL from a route or system path.
Namespace
Drupal\Core\RoutingCode
public function getPathFromRoute(string $name, array $parameters = []);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.