function entity_access_controller

Returns the entity access controller for the given entity type.

Parameters

string $entity_type: The type of the entity.

Return value

\Drupal\Core\Entity\EntityAccessControllerInterface An entity access controller instance.

File

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

Code

function entity_access_controller($entity_type) {
  return Drupal::entityManager()
    ->getAccessController($entity_type);
}