Module Development

Audience and Approach for Drupal 8, 9, and 10

Are you ready to learn how to extend and customize Drupal sites in code? The Drupal Module Developer Guide will introduce you to extending Drupal with modules. You will learn foundational concepts and get hands-on practice with a variety of APIs used in Drupal coding and development. We'll be extending the site we built in the Drupal User Guide. If you're new to Drupal site building, we recommend that you walk through the Drupal User Guide first.

Goal

Decide if this guide is for you.

Prerequisites

  • None.

Audience

We created the Drupal Module Developer Guide for developers familiar with PHP but new to Drupal module development. We assume you have a foundation in PHP development and want to expand your skills into Drupal. This guide is not for absolute beginners in coding or PHP. This guide is also suitable for folks with development experience in Drupal 7 but who need to get familiar with the latest API.

You'll have the most success with this guide if you:

  • Understand PHP and object-oriented programming concepts.
  • Are familiar with common site building and administration tasks in Drupal.
  • Can navigate files and execute commands in a Terminal.
  • Are familiar with downloading modules using Composer and installing them.

Approach

In this guide, we use a project-based learning approach. You'll have the best learning experience if you read the guide in order and in full. Tutorials often build upon previous work. As you progress through the guide, we'll refactor and expand code examples from previous tutorials, to give you hands-on practice with new concepts and patterns.

Learning objectives

Upon completing this guide, you should be able to:

  • Plan the content architecture for a custom Drupal module.
  • Build a module using Drupal core APIs and recognizable design patterns.
  • Write secure code that adheres to Drupal coding standards and includes automated tests.
  • Find documentation and blog posts on advanced topics, to expand your knowledge and skills.
  • Engage with the global Drupal community.

Recap

The Drupal Module Developer guide is for PHP programmers who are familiar with Drupal site building and administration but new to module development in the latest version of Drupal. This guide uses a project-based approach with a guiding scenario that was originally introduced in the Drupal User Guide.

Further your understanding

  • Familiarize yourself with the project-based learning scenario we'll use in this guide at Guiding Scenario.

Additional resources

Drupal Module Developer Guide