function EntityRouteEnhancer::enhanceEntityList

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Entity/Enhancer/EntityRouteEnhancer.php \Drupal\Core\Entity\Enhancer\EntityRouteEnhancer::enhanceEntityList()
  2. 10 core/lib/Drupal/Core/Entity/Enhancer/EntityRouteEnhancer.php \Drupal\Core\Entity\Enhancer\EntityRouteEnhancer::enhanceEntityList()
  3. 11.x core/lib/Drupal/Core/Entity/Enhancer/EntityRouteEnhancer.php \Drupal\Core\Entity\Enhancer\EntityRouteEnhancer::enhanceEntityList()

Update defaults for an entity list.

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::enhanceEntityList()
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 82

Class

EntityRouteEnhancer
Enhances an entity form route with the appropriate controller.

Namespace

Drupal\Core\Entity\Enhancer

Code

protected function enhanceEntityList(array $defaults, Request $request) {
    $defaults['_controller'] = '\\Drupal\\Core\\Entity\\Controller\\EntityListController::listing';
    $defaults['entity_type'] = $defaults['_entity_list'];
    unset($defaults['_entity_list']);
    return $defaults;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.