function Url::getRouteParameters
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Url.php \Drupal\Core\Url::getRouteParameters()
- 10 core/lib/Drupal/Core/Url.php \Drupal\Core\Url::getRouteParameters()
- 8.9.x core/lib/Drupal/Core/Url.php \Drupal\Core\Url::getRouteParameters()
Returns the route parameters.
Return value
array
Throws
\UnexpectedValueException. If this is a URI with no corresponding route.
File
-
core/
lib/ Drupal/ Core/ Url.php, line 581
Class
- Url
- Defines an object that holds information about a URL.
Namespace
Drupal\CoreCode
public function getRouteParameters() {
if ($this->unrouted) {
throw new \UnexpectedValueException('External URLs do not have internal route parameters.');
}
return $this->routeParameters;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.