Returns the entity access controller for the given entity type.
string $entity_type: The type of the entity.
\Drupal\Core\Entity\EntityAccessControllerInterface An entity access controller instance.
Use \Drupal\Core\Entity\EntityManager::getRenderController().
function entity_access_controller($entity_type) {
return Drupal::entityManager()
->getAccessController($entity_type);
}