Dependency Injection for Custom Classes Using ContainerInjectionInterface
Introduction
You understand Drupal services and dependency injection. But what about classes that should not be services--data transfer objects, value objects, and helper classes that represent specific instances rather than reusable application logic?