Introduction
Drupal is a powerful open source web Content Management System, which can have its functionality extended by means of Modules. This is a step by step guide to making a LocalGovDrupal module, using a School Term Dates content type as the example.
It is an adaptation and bringing together of a number of existing module creation how-to guides I've found across the internet, including:
- https://www.specbee.com/blogs/drupal-9-custom-module-development
- https://josephbcasey.github.io/d8-interconnections-demo/
The tutorial assumes the reader is a beginner along the path of developing for Drupal, but is somebody who has sftp access to the filesystem of a Drupal site and has done basic configuration and content management of a Drupal site. Since Drupal development is done principally in .php it naturally assumes a working knowledge of that, but not necessarily an advanced knowledge; some object-oriented .php concepts are visible, but a full understanding of the theory behind object-oriented .php is not necessary so long as the reader is able to recognise what they see and translate that to their own situation.
Because I'm creating this guide as part of my own learning, there are a number of pieces of code and files I tell you to include which, at the time of writing, have no explanation as to why because I don't fully understand it myself - as I progress with my own learning I'll be coming back to explain things currently unexplained as I discover what they're actually for myself.