Last updated April 1, 2015. Created on August 30, 2013.
Edited by anavarre, oadaeh, eojthebrave, guru4vedi. Log in to edit this page.

If you are looking for the documentation or the entity API in Drupal 7, click here.

The entity system in Drupal 7 was introduced very late in the development cycle and only standardized how entities were loaded. The contributed entity.module built on top of it and added support for saving and deleting entities and many other APIs as well. Many of these improvements are now included in Drupal 8.

Below is a short overview of the entity system in Drupal 8, each part is documented on separate sub-pages.

Entities are now typed classes with methods. There are generic methods like $entity->id() and entity type specific methods like $node->getTitle(), all of them are defined and documented in interfaces.

Entities are supported by handlers. There is a storage handler that supports loading, saving and deleting entities, including default support for revisions, translations and configurable fields, in case of content entities. Additionally, there are separate handlers for access control, viewing entities, listing them and forms.

Entity types in core are either configuration or content entities. Configuration entities are stored in the configuration system and can be deployed and provided as default configuration. Content entities consist of configurable and base fields, can have revisions and support translations.

The entity system has been overhauled and extended for Drupal 8.

This page is still a stub, documentation is being written while the Entity API is finalized for Drupal 8.

- Handlers
- - Storage
- - Access
- - Forms
- - View Builder
- - List
- Bundles
- Configuration entities
- Content entities
- - Revisions
- - Translations
- - Fields
- UUID support
- Entity query
- Routing

In Drupal 8 Entity API is being worked on in
* #2095603: [meta] Complete Entity Field API
* #1540656: [META] Entity Serialization API for web services (e.g. content staging)
* _#1234567: Entity Forms API

Looking for support? Visit the forums, or join #drupal-support in IRC.