function entity_get_controller

Gets the entity controller class for an entity type.

Return value

Drupal\Core\Entity\EntityStorageControllerInterface

File

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

Code

function entity_get_controller($entity_type) {
  return Drupal::entityManager()
    ->getStorageController($entity_type);
}