Skip to Content
Beginning Drupal®
book

Beginning Drupal®

by Jacob Redding
April 2010
Beginner content levelBeginner
480 pages
11h 33m
English
Wrox
Content preview from Beginning Drupal®

Chapter 16. Development Hooks

WHAT YOU WILL LEARN IN THIS CHAPTER:

  • The top eight Drupal hooks, which allow you to:

  • Create custom pages

  • Add custom permissions

  • Act upon user activities such as new account creations

  • Create custom filters for use in text formats

  • Modify your site's forms

  • Making your modules translatable

  • Adding theming functions to your modules

The previous chapter provided an introduction to Drupal module development, but this chapter dives into the subject. If you are a seasoned developer new to Drupal or simply ready to dive straight into the subject and get to the heart of development, this is the chapter for you. This chapter explains how to use the most common Drupal hooks and theming tasks. In researching this book I wrote a script that analyzed over 2,300 stable modules for Drupal 6, the most active and well-used version of Drupal to date. From this list I chose the top eight most common hooks to introduce you to in this chapter.

These hooks allow you to create custom pages, add administrative settings, custom permissions, new blocks, act on user activities, create custom filters, and modify any of your site's forms. I was pleasantly surprised to find that hook_help also made it into the top eight, a hook that provides helpful documentation to your site users.

Why eight? Actually there are over ten. The ninth is hook_theme, which is introduced in the theming portion of this chapter. 10, 11, and 12 are hook_schema, hook_install, and hook_uninstall all of which are used for ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Drupal® 7 Bible

Drupal® 7 Bible

Ric Shreves, Brice Dunwoodie
Pro Drupal 7 Development, Third Edition

Pro Drupal 7 Development, Third Edition

Todd Tomlinson, John K. VanDyk

Publisher Resources

ISBN: 9780470438527Purchase book