Create custom content types with bundle classes

As of Drupal 9.3, entity bundles (a.k.a. content types) can be created using classes that extend a content entity type class (https://www.drupal.org/node/3191609#comment-14603206).  Since content types most commonly add fields to a content entity, this is a much more intuitive way of extending entities than the old way, where content types are config entities defined in the UI, and content type and field definitions have to be exported to .yml files in order to be moved across environments.

Subscribe with RSS Subscribe to RSS - bundle class