EntityRouteEnhancer::enhanceEntityList

protected EntityRouteEnhancer::enhanceEntityList(array $defaults, Request $request)

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.

File

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

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;
}
doc_Drupal
2016-10-29 09:07:33
Comments
Leave a Comment

Please login to continue.