You are here

public function EnhancerInterface::enhance in Drupal 9

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.

7 methods override EnhancerInterface::enhance()
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.
FieldUiRouteEnhancer::enhance in core/modules/field_ui/src/Routing/FieldUiRouteEnhancer.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.
ParamConversionEnhancer::enhance in core/lib/Drupal/Core/Routing/Enhancer/ParamConversionEnhancer.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);