dr:api_sequences
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| dr:api_sequences [2005/10/16 19:06] – Step 2: preview new node fgm | dr:api_sequences [2020/11/23 17:23] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== API Sequences: | + | ====== API Sequences: node life cycle===== |
| (in Drupal 4.6.x) | (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:// | ||
| + | ===== Table of hook calls seen by a module ===== | ||
| + | < | ||
| + | <style type=" | ||
| + | body { font-size: | ||
| + | th, td { vertical-align: | ||
| + | th[scope=" | ||
| + | td { vertical-align: | ||
| + | </ | ||
| + | <table cellspacing=" | ||
| + | <tr> | ||
| + | < | ||
| + | < | ||
| + | <th width=" | ||
| + | < | ||
| + | invalid new</ | ||
| + | < | ||
| + | valid new</ | ||
| + | < | ||
| + | after create</ | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <th scope=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <th scope=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | <td>1 per node type</ | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <th scope=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <th scope=" | ||
| + | < | ||
| + | name</ | ||
| + | < | ||
| + | name</ | ||
| + | < | ||
| + | name</ | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <th scope=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <th scope=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <th scope=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <th scope=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | name of node owner</ | ||
| + | < | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <th scope=" | ||
| + | < | ||
| + | < | ||
| + | module fields< | ||
| + | no object</ | ||
| + | < | ||
| + | module fields< | ||
| + | no object</ | ||
| + | < | ||
| + | module fields< | ||
| + | no object</ | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | <br> | ||
| + | loaded object</ | ||
| + | < | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <th scope=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <th scope=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <th scope=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | module fields< | ||
| + | no object< | ||
| + | valid nid </td> | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <th scope=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <th scope=" | ||
| + | < | ||
| + | < | ||
| + | name</ | ||
| + | < | ||
| + | name</ | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <th scope=" | ||
| + | < | ||
| + | < | ||
| + | module fields< | ||
| + | no object</ | ||
| + | < | ||
| + | <br> | ||
| + | loaded object</ | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <th scope=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <th scope=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <th scope=" | ||
| + | < | ||
| + | < | ||
| + | module fields< | ||
| + | no object</ | ||
| + | < | ||
| + | module fields< | ||
| + | no object</ | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | <br> | ||
| + | loaded object</ | ||
| + | < | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <th scope=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <th scope=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <th scope=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <th scope=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <th scope=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <th scope=" | ||
| + | <td>1 per block</ | ||
| + | <td>1 per block</ | ||
| + | <td>1 per block</ | ||
| + | <td>1 per block</ | ||
| + | <td>1 per block</ | ||
| + | <td>1 per block</ | ||
| + | <td>1 per block</ | ||
| + | <td>1 per block</ | ||
| + | </tr> | ||
| + | <tr> | ||
| + | <th scope=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | </ | ||
| + | </ | ||
| + | ===== Notes ===== | ||
| + | The difference between ' | ||
| + | * " | ||
| + | * " | ||
| + | Basically, modules fields are returned from a HTML form, whereas a loaded object comes from the DB. | ||
| - | ===== Step 1: Clicking on node type in " | + | Of course, any additional calls done by the module |
| - | + | ||
| - | * Initialization part | + | |
| - | * hook_menu | + | |
| - | * hook_node_types | + | |
| - | * hook_user(' | + | |
| - | * NO LOAD PART | + | |
| - | * node_validate | + | |
| - | * hook_validate. Builtin fields initialized | + | |
| - | * hook_nodeapi(' | + | |
| - | * Form part | + | |
| - | * hook_nodeapi(' | + | |
| - | * hook_form. Builtin fields initialized. | + | |
| - | * hook_nodeapi(' | + | |
| - | * hook_nodeapi(' | + | |
| - | * Rest of page | + | |
| - | * hook_name | + | |
| - | * hook_node_types. Again. | + | |
| - | * hook_block. As many times as there are blocks to be displayed | + | |
| - | * hook_help(section = node/ | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | ===== Step 2 : Clicking on PREVIEW for a new node ===== | + | |
| - | + | ||
| - | * hook_form. Node contains form fields, mixing builtin fields and module from object. No object. | + | |
| - | + | ||
| - | * Initialization part | + | |
| - | * hook_menu | + | |
| - | * hook_user('load' | + | |
| - | * NO LOAD PART | + | |
| - | * node_validate | + | |
| - | * hook_validate. Node contains form fields, mixing builtin fields and module from object. No object. | + | |
| - | * hook_nodeapi(' | + | |
| - | * Preview part | + | |
| - | * hook_user(' | + | |
| - | * hook_view(). | + | |
| - | * Form part | + | |
| - | * hook_nodeapi(' | + | |
| - | * hook_form. Builtin fields initialized. | + | |
| - | * hook_nodeapi(' | + | |
| - | * hook_nodeapi(' | + | |
| - | * Rest of page | + | |
| - | * hook_name | + | |
| - | * hook_block. As many times as there are blocks to be displayed by this module. | + | |
| - | * hook_help(section = node/add/<node type>) | + | |
| - | + | ||
| - | ==== Clicking on SUBMIT for an invalid node ==== | + | |
| - | + | ||
| - | * hook_validate | + | |
| - | * hook_view. Node contains loaded object if applicable | + | |
| - | * hook_nodeapi(' | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | ==== Step 4 : Clicking on SUBMIT for a valid node ==== | + | |
| - | + | ||
| - | * Initialization part | + | |
| - | * hook_menu | + | |
| - | * hook_user(' | + | |
| - | * NO LOAD PART | + | |
| - | * node_validate | + | |
| - | * hook_validate. Node contains form fields, mixing builtin fields and module from object. No object. | + | |
| - | * hook_nodeapi(' | + | |
| - | * Insert part | + | |
| - | * hook_nodeapi(' | + | |
| - | * hook_insert. Node contains form fields, mixing builtin fields and module from object. No object. | + | |
| - | * hook_nodeapi(' | + | |
| - | * Rest of page | + | |
| - | * hook_name | + | |
| - | * hook_node_types | + | |
| - | * hook_block. As many times as there are blocks to be displayed by this module. | + | |
| - | * hook_help(section = node/add/< | + | |
| - | + | ||
| - | ===== Step 6 : Editing | + | |
| - | + | ||
| - | * Loading part: | + | |
| - | * hook_load | + | |
| - | * hook_nodeapi(' | + | |
| - | * Validation part: | + | |
| - | * hook_validate | + | |
| - | * hook_nodeapi(' | + | |
| - | * Form part: | + | |
| - | * hook_nodeapi(' | + | |
| - | * hook_form. Node contains loaded object if applicable. | + | |
| - | * hook_nodeapi(' | + | |
| - | * hook_nodeapi(' | + | |
| - | * hook_nodeapi(' | + | |
| + | Similarly, any call to [[http:// | ||
dr/api_sequences.1129489611.txt.gz · Last modified: (external edit)
