Fields

The principle way data is modeled by entities is through fields. Entities themselves are essentially just a collection of different types of fields which hold various types of data.

Drupal 7 developers will remember that in D7, entities had two types of fields, usually referred to as properties and Field UI fields. The former were essentially simple properties on the entity class and were stored in the entity table itself. The latter were fields that were attached to bundles through the UI and had separate database tables.

Things are somewhat similar in Drupal 8 but also very different. First of all, we make a big difference between the fields that belong to content versus configuration entities. Then, as in D7, we still make a distinction ...

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.