Module Development

Introduction to Inheritance in PHP for Drupal 8, 9

Sprout Video

In this series, we’ll continue to build the spaceship app that we’ve started in Introduction to Object-Oriented PHP and Object-Oriented PHP Part 2. In this tutorial, I’ll show you how to use the extends keyword in PHP so that you can use it to inherit properties and methods from another class.

Additional resources

Object Inheritance (PHP Manual)