====== API Sequences: node life cycle===== (in Drupal 4.6.x) ... during the building of the various pages creating and editing a custom node..., as noted on a 4.6.3 installation during the development of the [[http://drupal.org/node/30947|helpdesk module]] ===== Table of hook calls seen by a module =====
Sequence of hooks fired | 1: New | 2: Preview | 3: Submit invalid new |
4: Submit valid new |
5: Redirect after create |
6: View node | 7: Edit node | 8: Track node |
---|---|---|---|---|---|---|---|---|
hook_menu | X | X | X | X | X | X | X | X |
hook_access | 1 per node type | |||||||
hook_node_types | X | |||||||
hook_user('load') | no uid name |
no uid name |
no uid name |
no uid name |
||||
hook_load | valid nid | valid nid | valid nid | valid nid | ||||
hook_nodeapi ('load') | valid nid | valid nid | valid nid | valid nid | ||||
hook_menu | X | |||||||
hook_user('load') | no uid name of node owner |
|||||||
hook_validate | builtin fields | builtin fields module fields no object |
builtin fields module fields no object |
builtin fields module fields no object |
builtin fields loaded object |
|||
hook_nodeapi('validate' | X | X | X | X | valid nid | |||
hook_nodeapi('fields') | X | |||||||
hook_insert | builtin fields module fields no object valid nid |
|||||||
hook_nodeapi('insert') | valid nid | |||||||
hook_user('load') | no uid name |
no uid name |
||||||
hook_view | builtin fields module fields no object |
builtin fields loaded object |
valid nid | valid nid | ||||
hook_nodeapi('view') | X | valid nid | valid nid | |||||
hook_nodeapi('form pre') | X | X | X | valid nid | ||||
hook_form | builtin fields | builtin fields module fields no object |
builtin fields module fields no object |
builtin fields loaded object |
||||
hook_nodeapi('form post') | X | X | X | valid nid | ||||
hook_nodeapi('form admin') | X | X | X | valid nid | ||||
hook_nodeapi('form param') | X | X | X | valid nid | ||||
hook_node_name | X | X | X | valid nid | ||||
hook_node_types | X | X | X | X | X | X | X | |
hook_block | 1 per block | 1 per block | 1 per block | 1 per block | 1 per block | 1 per block | 1 per block | 1 per block |
hook_help('node/...') | add/<node type> | add/<node type> | add/<node type> | add/<node type> | <nid> | <nid> | <nid>/edit | <nid>/track |
hook_user('load')
is fired from the module.
Similarly, any call to [[http://drupaldocs.org/api/head/function/l|l()]] causes [[http://drupaldocs.org/api/head/function/hook_link|hook_link]] to be fired too.