Technical requirements
This chapter will require a custom module that has a routing.yml
file and a controller named ArticleController
in the src/Controller
directory of the module. In the following recipes, the module name is mymodule
. Replace as appropriate. You can find the full code used in this chapter on GitHub: https://github.com/PacktPublishing/Drupal-10-Development-Cookbook/tree/main/chp06
We are using the Article content type created by the standard Drupal installation.
The recipes in this chapter have example HTTP requests that are used to interact with code created in each recipe. These HTTP requests can be run with any HTTP client. If you use VSCode, try the REST Client extension (https://marketplace.visualstudio.com/items?itemName=humao.rest-client), or if you have PhpStorm, use the built-in HTTP Client (https://www.jetbrains.com/help/idea/http-client-in-product-code-editor.html). If for some reason you do not have an editor or cannot get those working, you can use...