class RouteMatchValueResolver
Same name in other branches
- 9 core/lib/Drupal/Core/Controller/ArgumentResolver/RouteMatchValueResolver.php \Drupal\Core\Controller\ArgumentResolver\RouteMatchValueResolver
- 8.9.x core/lib/Drupal/Core/Controller/ArgumentResolver/RouteMatchValueResolver.php \Drupal\Core\Controller\ArgumentResolver\RouteMatchValueResolver
- 10 core/lib/Drupal/Core/Controller/ArgumentResolver/RouteMatchValueResolver.php \Drupal\Core\Controller\ArgumentResolver\RouteMatchValueResolver
Yields a RouteMatch object based on the request object passed along.
Hierarchy
- class \Drupal\Core\Controller\ArgumentResolver\RouteMatchValueResolver implements \Symfony\Component\HttpKernel\Controller\ValueResolverInterface
Expanded class hierarchy of RouteMatchValueResolver
File
-
core/
lib/ Drupal/ Core/ Controller/ ArgumentResolver/ RouteMatchValueResolver.php, line 14
Namespace
Drupal\Core\Controller\ArgumentResolverView source
final class RouteMatchValueResolver implements ValueResolverInterface {
/**
* {@inheritdoc}
*/
public function resolve(Request $request, ArgumentMetadata $argument) : array {
return $argument->getType() === RouteMatchInterface::class || is_subclass_of($argument->getType(), RouteMatchInterface::class) ? [
RouteMatch::createFromRequest($request),
] : [];
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
RouteMatchValueResolver::resolve | public | function |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.