9
Creating Custom Entity Types
In Chapter 6, Accessing and Working with Entities, we explored manipulating individual entities. This chapter covers creating custom entity types for custom data models. Entities in Drupal are made up of different entity types. Entity types are defined as annotated plugins. Each entity is an instance of its entity type class. Entity types can also be enhanced to have different classes based on their bundle. You will learn how to implement your own custom entity in this chapter.
In this chapter, we will go through the following recipes:
- Using custom classes for entity bundles
- Creating a configuration entity type
- Creating a content entity type
- Creating a bundle for a content entity type
- Implementing access control ...
Get Drupal 10 Development Cookbook - Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.