function EnhancerInterface::enhance
Same name in other branches
- 10 core/lib/Drupal/Core/Routing/EnhancerInterface.php \Drupal\Core\Routing\EnhancerInterface::enhance()
- 11.x core/lib/Drupal/Core/Routing/EnhancerInterface.php \Drupal\Core\Routing\EnhancerInterface::enhance()
Updates the defaults for a route definition based on the request.
Parameters
array $defaults: The defaults, maps to '_defaults' in the route definition YAML.
\Symfony\Component\HttpFoundation\Request $request: The Request instance.
Return value
array The modified defaults. Each enhancer MUST return the $defaults but may add or remove values.
8 methods override EnhancerInterface::enhance()
- EntityBundleRouteEnhancer::enhance in core/
lib/ Drupal/ Core/ Entity/ Enhancer/ EntityBundleRouteEnhancer.php - Updates the defaults for a route definition based on the request.
- EntityRevisionRouteEnhancer::enhance in core/
lib/ Drupal/ Core/ Routing/ Enhancer/ EntityRevisionRouteEnhancer.php - Updates the defaults for a route definition based on the request.
- EntityRouteEnhancer::enhance in core/
lib/ Drupal/ Core/ Entity/ Enhancer/ EntityRouteEnhancer.php - Updates the defaults for a route definition based on the request.
- FormRouteEnhancer::enhance in core/
lib/ Drupal/ Core/ Routing/ Enhancer/ FormRouteEnhancer.php - Updates the defaults for a route definition based on the request.
- LayoutTempstoreRouteEnhancer::enhance in core/
modules/ layout_builder/ src/ Routing/ LayoutTempstoreRouteEnhancer.php - Updates the defaults for a route definition based on the request.
File
-
core/
lib/ Drupal/ Core/ Routing/ EnhancerInterface.php, line 24
Class
- EnhancerInterface
- A route enhance service to determine route enhance rules.
Namespace
Drupal\Core\RoutingCode
public function enhance(array $defaults, Request $request);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.