public function CurrentRouteMatch::getParameter in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Routing/CurrentRouteMatch.php \Drupal\Core\Routing\CurrentRouteMatch::getParameter()
Returns the processed value of a named route parameter.
Raw URL parameters are processed by the parameter conversion system, which does operations such as converting entity ID parameters to fully-loaded entities. For example, the path node/12345 would have a raw node ID parameter value of 12345, while the processed parameter value would be the corresponding loaded node object.
Parameters
string $parameter_name: The parameter name.
Return value
mixed|null The parameter value. NULL if the route doesn't define the parameter or if the parameter value can't be determined from the request.
Overrides RouteMatchInterface::getParameter
See also
\Drupal\Core\Routing\RouteMatchInterface::getRawParameter()
File
- core/
lib/ Drupal/ Core/ Routing/ CurrentRouteMatch.php, line 60 - Contains \Drupal\Core\Routing\CurrentRouteMatch.
Class
- CurrentRouteMatch
- Default object for current_route_match service.
Namespace
Drupal\Core\RoutingCode
public function getParameter($parameter_name) {
return $this
->getCurrentRouteMatch()
->getParameter($parameter_name);
}