// Exmaple, how to get service from container $entity_type_manager = \Drupal::service('entity_type.manager');