Module Development

Separate Logic into Abstract Classes for Drupal 8, 9

Sprout Video

In this tutorial, I will show you how to handle new requirements for data storage by creating two smaller abstract classes out of our original data storage class. By creating these new abstract classes, we can build more flexibility into our code.

Additional resources

Class Abstraction (PHP Manual)