function RouteMatchValueResolver::resolve
Same name in other branches
- 9 core/lib/Drupal/Core/Controller/ArgumentResolver/RouteMatchValueResolver.php \Drupal\Core\Controller\ArgumentResolver\RouteMatchValueResolver::resolve()
- 8.9.x core/lib/Drupal/Core/Controller/ArgumentResolver/RouteMatchValueResolver.php \Drupal\Core\Controller\ArgumentResolver\RouteMatchValueResolver::resolve()
- 11.x core/lib/Drupal/Core/Controller/ArgumentResolver/RouteMatchValueResolver.php \Drupal\Core\Controller\ArgumentResolver\RouteMatchValueResolver::resolve()
File
-
core/
lib/ Drupal/ Core/ Controller/ ArgumentResolver/ RouteMatchValueResolver.php, line 32
Class
- RouteMatchValueResolver
- Yields a RouteMatch object based on the request object passed along.
Namespace
Drupal\Core\Controller\ArgumentResolverCode
public function resolve(Request $request, ArgumentMetadata $argument) : array {
return $argument->getType() === RouteMatchInterface::class || is_subclass_of($argument->getType(), RouteMatchInterface::class) ? [
RouteMatch::createFromRequest($request),
] : [];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.