Guide

Work with Data in Modules for Drupal 8, 9, 10, and 11

What will you learn

  • Overview of Entity API components and terminology
  • Creating, reading, updating, and deleting entity data
  • Practical examples of creating custom entities
  • Using the EntityQuery service to find entities
  • Overview of Field API components: field types, widgets, and formatters
  • Working with field data in code
  • Creating and managing custom fields
  • Practical examples and use cases for field widgets and formatters
  • Defining and using configuration data types
  • Adding properties to a configuration entity

Overview

Drupal's Entity API offers a handy framework for defining, managing, and interacting with data objects (entities) in a consistent and extensible manner across the system.

Drupal's Field API provides a powerful system for defining, managing, and storing various types of structured data fields on entities, allowing for flexible content modeling and customization.

Configuration entities in Drupal are objects that store and manage configuration settings, allowing for exportable, deployable, and version-controlled configuration data within a Drupal site.

Drupal developer learning resources

Entities

In this course you’ll learn the foundational concepts and terminology of the Entity API, including the differences between configuration and content entities, and how to create, read, update, and delete entity data. We’ll cover practical examples of creating custom entities, implementing validation logic, and using hooks to interact with entity lifecycle operations. You will also learn how to use the EntityQuery service to find and manipulate subsets of data, and how to implement access control for entities. Additionally, the course will delve into the use of annotations and handlers, and how to leverage the Entity API for better performance and extensibility in your Drupal modules.

Fields

In this course you’ll learn the foundational concepts and components of the Field API, including how to define and manage field instances, field types, form widgets, and display formatters. The course will cover how to use the Field API to create custom fields, interact with field data programmatically, and alter field behavior using hooks. Additionally, you will explore the differences between base fields and user-defined fields, and how to leverage the Field API to build flexible and extensible data models in Drupal.

Configuration Entities

This course will cover the creation and management of configuration entities, including defining configuration data types, setting default configurations in modules, and providing initial settings with simple configuration. You will also learn how to create and manage settings forms, get and set configuration values within forms, and add properties to configuration entities. Additionally, the course will teach you how to load and save configuration entity data programmatically, ensuring you can effectively manage configuration data within your Drupal modules.

“Drupalize.Me has trained thousands of Drupalistas. Their video lessons help to address our constant need for more Drupal talent. Drupal needs training like this to support its growth.”
Dries Buytaert
Drupal Founder and Project Lead
Photo of Dries Buytaert
“They’re easy to understand. They’re thorough. They’re funny. They’re always entertaining, and it makes it easy to learn parts of Drupal and how you can integrate it into your workflow and learn more and have a good time doing it.”
Roger Carr
Drupalize.Me Member
Photo of Roger Carr
“The mission of the Drupal Association is to foster and support the Drupal software project, the community, and its growth. Drupal education, like that provided by Drupalize.Me, is important to this mission.”
Megan Sanicki
Former Exec. Director, Drupal Assoc.
Photo of Megan Sanicki

FAQs

Am I required to sign a contract?
No. You can purchase a membership and/or cancel any time. Drupalize.Me is a pay-as-you-go service.

Can I preview tutorials before joining?
Yes! Just navigate to our tutorial library. Our free tutorials are labeled with a green "FREE" tag.

Can I watch videos on my mobile device?
Yes! Drupalize.Me is a responsive site and can be accessed in the browser on any mobile device. More FAQs