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()

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);
}