Entity API Hooks for Drupal 8, Drupal 9

Last updated February 24, 2022
Module Development8.9.x/9.3.x

Drupal's Entity system provides several hooks that allow custom code to interact with various parts of the entity life cycle.

In this tutorial we'll:

  • Examine the available hooks
  • Learn how to make use of them to act on several different types of operations on individual entities

By the end if this tutorial you should have a better understanding of the hooks available to developers who want to respond to entity lifecycle operations and how to use them to customize the way specific entity types work.