Module Development

An Army of PHP Service Classes for Drupal 8, 9

Sprout Video

In this PHP tutorial we are going to continue to remove the flat functions in our code. We'll refactor one of them to a private function and create a new ShipLoader service class to clean up the rest. With this refactoring in place, we'll be able to rename the functions.php file since it won't contain any functions any longer.