function RouteMatchValueResolver::supports

Same name in other branches
  1. 9 core/lib/Drupal/Core/Controller/ArgumentResolver/RouteMatchValueResolver.php \Drupal\Core\Controller\ArgumentResolver\RouteMatchValueResolver::supports()
  2. 8.9.x core/lib/Drupal/Core/Controller/ArgumentResolver/RouteMatchValueResolver.php \Drupal\Core\Controller\ArgumentResolver\RouteMatchValueResolver::supports()

Deprecated

in drupal:10.2.0 and is removed from drupal:11.0.0. There is no replacement.

See also

https://www.drupal.org/node/3383585

File

core/lib/Drupal/Core/Controller/ArgumentResolver/RouteMatchValueResolver.php, line 24

Class

RouteMatchValueResolver
Yields a RouteMatch object based on the request object passed along.

Namespace

Drupal\Core\Controller\ArgumentResolver

Code

public function supports(Request $request, ArgumentMetadata $argument) : bool {
    @trigger_error(__METHOD__ . ' is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. There is no replacement. See https://www.drupal.org/node/3383585', E_USER_DEPRECATED);
    return $argument->getType() == RouteMatchInterface::class || is_subclass_of($argument->getType(), RouteMatchInterface::class);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.