Entity API

Entities store content and configuration in a flexible way, allowing fields to be attached and different types to be created.

The Entity API provides a way to define and alter entities.

Content Entities

Nodes are based on content entities, and are a good example of what you can create as a custom entity.

Entity Annotations

Annotations are PHP comments that are parsed as configuration for the class.

Content entities use the @ContentEntityType annotation to define require properties.

Image
Smart Link content entity annotation

Configuration Entities

A configuration entity can be exported to config.

For example a taxonomy vocabulary is a config entity, but the terms are content.

Tags
Entity