Issue #3522372: Use Dependency Injection (DI) instead of calling the Drupal::service() method directly
Closes #3522372