\Drupal::entityTypeManager()->getStorage($entity_type)->load($id);
See : https://api.drupal.org/api/drupal/core%21includes%21entity.inc/function/entity_load/8.3.x
Load a entity type using entityTypeManager
Example : $nodeEntity = \Drupal::entityTypeManager()->getDefinition('node');
Comments