Community Documentation

Core hooks cheat sheets

Last updated March 2, 2013. Created by redndahead on January 21, 2008.
Edited by jenlampton, Ayesh, patrickd, alvinj. Log in to edit this page.

As part of GHOP 2007, one task was to create a cheat sheet for core hooks. kourge came to the rescue and created such a cheat sheet for Drupal 6. See the attachment below.

For Drupal 7 there is now also a Cheat Sheet Generator module that generates a detailed list of all available core hooks:

AttachmentSize
drupal_6_core_hooks_cheat_sheet.pdf117.16 KB

Comments

Core API Classified by Function

Here's the start of a classification of hook by function or area. I think what's really needed in a mind-graph or other classification system.

System

hook_cron
hook_flush_caches
hook_locale
hook_mail
hook_mail_alter

Module Lifetime

hook_enable
hook_disable

Node Persistence

hook_delete
hook_insert

Permissions

hook_access
hook_filter
hook_filter_tips

Node Loading

hook_db_rewrite_sql
hook_load

Path / URL

hook_menu
hook_menu_alter
hook_menu_link_alter
hook_file_download
hook_link
hook_link_alter

Processing Requests

hook_boot
hook_init
custom_url_rewrite_inbound
custom_url_rewrite_outbound
hook_exit
hook_footer

Block

hook_block

Actions/Triggers

hook_action_info
hook_action_info_alter
hook_actions_delete
hook_hook_info

Comments

hook_comment

Database

hook_db_rewrite_sql
hook_install

Form

hook_elements
hook_form
hook_forms
hook_form_alter
hook_form_FORM_ID_alter

Documentation

hook_help

-Tobias

is there a similar cheatsheet

is there a similar cheatsheet for Drupal7? (or at least one with updates/changes for drupal 7?)

Neil

Drupal 7

For D7 you can see this list:
http://api.drupal.org/api/drupal/includes!module.inc/group/hooks/7

About this page

Drupal version
Drupal 6.x
Audience
Designers/themers, Programmers
Drupal’s online documentation is © 2000-2013 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License. Comments on documentation pages are used to improve content and then deleted.
nobody click here