function EntityListController::listing

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Entity/Controller/EntityListController.php \Drupal\Core\Entity\Controller\EntityListController::listing()
  2. 10 core/lib/Drupal/Core/Entity/Controller/EntityListController.php \Drupal\Core\Entity\Controller\EntityListController::listing()
  3. 8.9.x core/lib/Drupal/Core/Entity/Controller/EntityListController.php \Drupal\Core\Entity\Controller\EntityListController::listing()

Provides the listing page for any entity type.

Parameters

string $entity_type: The entity type to render.

Return value

array A render array as expected by \Drupal\Core\Render\RendererInterface::render().

File

core/lib/Drupal/Core/Entity/Controller/EntityListController.php, line 22

Class

EntityListController
Defines a generic controller to list entities.

Namespace

Drupal\Core\Entity\Controller

Code

public function listing($entity_type) {
  return $this->entityTypeManager()
    ->getListBuilder($entity_type)
    ->render();
}

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