function entity_list_controller

Returns an entity list controller for a given entity type.

Parameters

string $entity_type: The type of the entity.

Return value

Drupal\Core\Entity\EntityListControllerInterface An entity list controller.

See also

\Drupal\Core\Entity\EntityManager

3 calls to entity_list_controller()
ConfigEntityListTest::testList in drupal/core/modules/config/lib/Drupal/config/Tests/ConfigEntityListTest.php
Tests entity list controller methods.
config_test_list_page in drupal/core/modules/config/tests/config_test/config_test.module
Page callback; Lists available ConfigTest objects.
picture_mapping_page in drupal/core/modules/picture/picture_mapping.admin.inc
Page callback: Presents the picture list page.

File

drupal/core/includes/entity.inc, line 505
Entity API for handling entities like nodes or users.

Code

function entity_list_controller($entity_type) {
  $storage = entity_get_controller($entity_type);
  $entity_info = entity_get_info($entity_type);
  $class = $entity_info['list_controller_class'];
  return new $class($entity_type, $storage);
}