Entity type plugins

Entity types are registered with Drupal as plugins. Yes, again. The Drupal\Core\Entity\Annotation\EntityType class is the base annotation class for these plugins and you will mainly see two subclasses (annotations)--ContentEntityType and ConfigEntityType. These are used to register content and configuration entity types, respectively.

The annotations classes map to plugin classes used to represent the entity types. The base class for these is Drupal\Core\Entity\EntityType, which is then extended by another ContentEntityType and ConfigEntityType. These plugin classes are used to represent the entity types in the system and are a good resource for seeing what kind of data we can use on the annotations of these plugins. With ...

Get Drupal 8 Module Development 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.