You are here

public function EnhancerInterface::enhance in Drupal 10

Same name and namespace in other branches
  1. 9 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.

6 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.

... See full list

File

core/lib/Drupal/Core/Routing/EnhancerInterface.php, line 24

Class

EnhancerInterface
A route enhance service to determine route enhance rules.

Namespace

Drupal\Core\Routing

Code

public function enhance(array $defaults, Request $request);