List called hooks

smk-ka - September 24, 2009 - 20:18
Project:API
Version:HEAD
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

Could we extend doxygen documentation with a list of hooks that a function calls, including short description and link to the full documentation (if one exists)? So that we could compile this list into a new section for each function. Currently, if you want to know which hooks a function calls you have to skim through the function code. Given the importance of hooks to Drupal, this is not only a huge waste of time but also not very developer friendly with regard to novices (and seasoned programmers overwhelmed by the sheer mass of changes in D7 ;).

A real-life example: form_builder() is the function that executes the #after_build hook on form elements — but to find that out you have to read through two thirds of the code. And then, what exactly was the purpose of after_build hook again, how does it relate to form_alter, etc.?

See attached mockup about how I imagine this information could be presented.

Thoughts?

AttachmentSize
api_hooks.png24.94 KB
 
 

Drupal is a registered trademark of Dries Buytaert.