Module Development

Concept: How Drupal Builds a Page for Drupal 8, 9, 10, and 11

One of the primary ways that modules extend Drupal is by adding dynamic pages with content generated by application-specific logic. This tutorial looks at Drupal's process of handling a user's request and transforming it into a complete web page. We'll answer questions like:

  • How does Drupal use Symfony's HttpKernel to process requests?
  • How do user-configured blocks and the theme layer contribute to the page's content and appearance?
  • What is the role of routes, controllers, and responses in this process?

In this tutorial, we'll:

  • Follow the journey of a user request from URL to an HTML response in Drupal.
  • Define the role of routes, controllers, and responses in Drupal's request handling.
  • See how blocks and the theme layer contribute to the final output of a Drupal page.

By the end of this tutorial, you should be able to describe Drupal's request flow, understand the interaction of its key components in building a page, and appreciate the modular architecture that drives Drupal's flexibility.

Drupal Module Developer Guide