Module Development

Introduction to Module Development for Drupal 7 for Drupal 7

This page is archived

We're keeping this page up as a courtesy to folks who may need to refer to old instructions. We don't plan to update this page.

Alternate resources

Sprout Video

"There's a module for that."

You've probably heard this before. Many times you can find a module that provides the functionality you need — or at least pretty close to what you need. Drupal's contributed module projects number in the thousands, but what if there isn't a module for your use case? You just might need to build a module for that.

In this series, you will learn about the tools and resources available to Drupal developers, including where to find documentation and what APIs are available to you, both on drupal.org and api.drupal.org. We'll take a look at the Devel module and learn how to use it to inspect the variables, objects, arrays and other things at work under the hood of Drupal 7.

You'll build several different modules that explore and interact with Drupal's various systems and API, including:

  • Form API
  • Menu system
  • Hooks
  • Render API
  • Theme system
  • Database API

Over the course of this series you'll be able to:

  • Describe the anatomy of a module
  • Implement common hooks
  • Write more secure code
  • Interact with Drupal's menu system
  • Create and alter forms
  • Peform CRUD operations on a database

This series starts with the basics and moves you step-by-step to more advanced concepts. Even if you are quite comfortable with PHP but are struggling to understand how to appropriately interact with Drupal 7's API, the lessons in this series can help you develop "The Drupal Way."

Additional resources

Devel module at Drupal.org