function RouteMatchInterface::getParameter
Same name in other branches
- 9 core/lib/Drupal/Core/Routing/RouteMatchInterface.php \Drupal\Core\Routing\RouteMatchInterface::getParameter()
- 8.9.x core/lib/Drupal/Core/Routing/RouteMatchInterface.php \Drupal\Core\Routing\RouteMatchInterface::getParameter()
- 11.x core/lib/Drupal/Core/Routing/RouteMatchInterface.php \Drupal\Core\Routing\RouteMatchInterface::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.
See also
\Drupal\Core\Routing\RouteMatchInterface::getRawParameter()
File
-
core/
lib/ Drupal/ Core/ Routing/ RouteMatchInterface.php, line 56
Class
- RouteMatchInterface
- Provides an interface for classes representing the result of routing.
Namespace
Drupal\Core\RoutingCode
public function getParameter($parameter_name);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.