interface EnhancerInterface
A route enhance service to determine route enhance rules.
Hierarchy
- interface \Drupal\Core\Routing\EnhancerInterface
 
Expanded class hierarchy of EnhancerInterface
All classes that implement EnhancerInterface
9 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  
File
- 
              core/
lib/ Drupal/ Core/ Routing/ EnhancerInterface.php, line 10  
Namespace
Drupal\Core\RoutingView 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
| Title Sort descending | Modifiers | Object type | Summary | Overrides | 
|---|---|---|---|---|
| EnhancerInterface::enhance | public | function | Updates the defaults for a route definition based on the request. | 8 | 
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.