Your First Drupal 9(or 8) Module
summary
A compact walkthrough that builds the role_notices module step by step: info, routing and menu links, a permissions entry, a settings form that stores per-role text in state, a block plugin that shows notices, and a service-based notices manager to decouple storage. Demo exposes a caching bug and then fixes it with cache tags invalidation on save so blocks update correctly. All code is on drupal.org with tagged demos and the final module runs on both Drupal 8 and 9.
AI-written summary · about
chapters (27)
- 0:00Introduction
- 0:41Audience
- 1:26Problem
- 1:39Example
- 1:52Agenda
- 2:23Module Demo
- 4:18Hello World
- 5:14Routing
- 8:58T4 Translate
- 9:44Menu Items
- 10:19Top Menu
- 10:44Route Name
- 13:43Assign Roles
- 15:59Create Form Interface
- 17:55Create Local Tasks
- 20:52Submit Form
- 22:40Save Form
- 23:13Form for Multiple
- 24:38Messenger
- 25:56Block
- 30:17Block Layout
- 32:06Notices Manager
- 33:15Service
- 34:31Services
- 36:47Cash Support
- 38:14Clear Cache
- 41:11Core Version Requirement








