You are here

interface EnhancerInterface in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Routing/EnhancerInterface.php \Drupal\Core\Routing\EnhancerInterface
  2. 9 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

8 files declare their use of EnhancerInterface
EntityBundleRouteEnhancer.php in core/lib/Drupal/Core/Entity/Enhancer/EntityBundleRouteEnhancer.php
EntityRevisionRouteEnhancer.php in core/lib/Drupal/Core/Routing/Enhancer/EntityRevisionRouteEnhancer.php
EntityRouteEnhancer.php in core/lib/Drupal/Core/Entity/Enhancer/EntityRouteEnhancer.php
FormRouteEnhancer.php in core/lib/Drupal/Core/Routing/Enhancer/FormRouteEnhancer.php
LayoutTempstoreRouteEnhancer.php in core/modules/layout_builder/src/Routing/LayoutTempstoreRouteEnhancer.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