Module Development

Create a Configuration Entity for Drupal 8, 9, and 10

In this tutorial we’re going to walk through the process of creating a custom configuration entity in Drupal in a custom module. We'll be using Drupal Console's generate:entity:config command to create and update the files in our Transcode Profile example module. After Drupal Console has generated and updated the files for our configuration entity, we'll walk through each file and see how they define data structure, metadata, an administrative interface, and menu links for a configuration entity in Drupal.

By the end of this tutorial, you should be able to:

  • Use Drupal Console to generate a configuration entity
  • Identify files associated with a configuration entity and summarize the purpose and function of the code inside each file
  • Find other examples of configuration entities in Drupal core