What will you learn
- Overview of routes, controllers, and responses
- Creating a route and controller
- Setting a dynamic title for a route
- Overview of parameters and value upcasting in routes
- Overview of menu links in a module
- Adding different types of menu links in a module
Overview
Drupal's routing system and controllers define and manage URL paths and the corresponding logic to handle requests, enabling the creation of custom pages and functionality within a Drupal site.
Drupal's Menu API, menu links, and local actions provide tools for defining and managing navigational elements and contextual actions, facilitating the creation of intuitive and organized site structures and user interfaces.
Drupal developer learning resources
Routes, controllers, and responses
This course covers how to map URLs to controller classes, handle dynamic parameters, set dynamic titles, and implement access control for routes. You’ll learn how to use parameter value upcasting to simplify route definitions, and how Drupal’s routing system builds on top of the Symfony framework. Additionally, you will learn about how Drupal turns an HTTP request into an HTML response.
In these related topics, you'll find both Drupalize.Me and external resources to help you along.