Last updated June 4, 2019
Module Development8.9.x/9.0.x

Entities are the building blocks that make up just about everything on a Drupal site. Regardless of whether entities provide configuration information or content, they are absolutely crucial to Drupal's data model.

In this tutorial we'll:

  • Look at the overall class hierarchy between the various entity types to see how they're related.
  • Examine differences between configuration and content entities in the code that defines them.
  • Look at some of the core code required to create an entity type.

By the end of this lesson you should be able to use an example to create a custom entity type in code.