function Router::addDeprecatedRouteEnhancer
Adds a deprecated route enhancer.
Parameters
\Drupal\Core\Routing\EnhancerInterface $route_enhancer: The route enhancer.
Deprecated
in drupal:10.1.0 and is removed from drupal:11.0.0. Use route_enhancer instead.
See also
https://www.drupal.org/node/2894934
File
-
core/
lib/ Drupal/ Core/ Routing/ Router.php, line 124
Class
- Router
- Router implementation in Drupal.
Namespace
Drupal\Core\RoutingCode
public function addDeprecatedRouteEnhancer(EnhancerInterface $route_enhancer) {
@trigger_error('non_lazy_route_enhancer is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use route_enhancer instead. See https://www.drupal.org/node/2894934', E_USER_DEPRECATED);
$this->enhancers[] = $route_enhancer;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.