You are here

interface EnhancerInterface in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Routing/EnhancerInterface.php \Drupal\Core\Routing\EnhancerInterface

A route enhance service to determine route enhance rules.

Hierarchy

Expanded class hierarchy of EnhancerInterface

All classes that implement EnhancerInterface

7 files declare their use of EnhancerInterface
EntityRevisionRouteEnhancer.php in core/lib/Drupal/Core/Routing/Enhancer/EntityRevisionRouteEnhancer.php
EntityRouteEnhancer.php in core/lib/Drupal/Core/Entity/Enhancer/EntityRouteEnhancer.php
FieldUiRouteEnhancer.php in core/modules/field_ui/src/Routing/FieldUiRouteEnhancer.php
FormRouteEnhancer.php in core/lib/Drupal/Core/Routing/Enhancer/FormRouteEnhancer.php
ParamConversionEnhancer.php in core/lib/Drupal/Core/Routing/Enhancer/ParamConversionEnhancer.php

... See full list

File

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

Namespace

Drupal\Core\Routing
View source
interface EnhancerInterface {

  /**
   * Updates the defaults for a route definition based on the request.
   *
   * @param array $defaults
   *   The defaults, maps to '_defaults' in the route definition YAML.
   * @param \Symfony\Component\HttpFoundation\Request $request
   *   The Request instance.
   *
   * @return array
   *   The modified defaults. Each enhancer MUST return the
   *   $defaults but may add or remove values.
   */
  public function enhance(array $defaults, Request $request);

}

Members

Namesort descending Modifiers Type Description Overrides
EnhancerInterface::enhance public function Updates the defaults for a route definition based on the request. 7