You are here

protected function EntityRouteEnhancer::enhanceEntityForm in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/Enhancer/EntityRouteEnhancer.php \Drupal\Core\Entity\Enhancer\EntityRouteEnhancer::enhanceEntityForm()
  2. 9 core/lib/Drupal/Core/Entity/Enhancer/EntityRouteEnhancer.php \Drupal\Core\Entity\Enhancer\EntityRouteEnhancer::enhanceEntityForm()

Update defaults for entity forms.

Parameters

array $defaults: The defaults to modify.

\Symfony\Component\HttpFoundation\Request $request: The Request instance.

Return value

array The modified defaults.

1 call to EntityRouteEnhancer::enhanceEntityForm()
EntityRouteEnhancer::enhance in core/lib/Drupal/Core/Entity/Enhancer/EntityRouteEnhancer.php
Updates the defaults for a route definition based on the request.

File

core/lib/Drupal/Core/Entity/Enhancer/EntityRouteEnhancer.php, line 65

Class

EntityRouteEnhancer
Enhances an entity form route with the appropriate controller.

Namespace

Drupal\Core\Entity\Enhancer

Code

protected function enhanceEntityForm(array $defaults, Request $request) {
  $defaults['_controller'] = 'controller.entity_form:getContentResult';
  return $defaults;
}