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:04] – (old revision restored) 127.0.0.1 | 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 ===== | ||
- | ===== Clicking a node's EDIT link ===== | + | < |
- | * Loading part: | + | <style type=" |
- | | + | body { font-size:small } |
- | | + | th, td { vertical-align: |
- | | + | th[scope=" |
- | | + | td { vertical-align: |
- | | + | </ |
- | | + | <table cellspacing=" |
- | | + | <tr> |
- | | + | |
- | | + | < |
- | | + | <th width=" |
- | | + | < |
+ | invalid new</ | ||
+ | < | ||
+ | valid new</ | ||
+ | < | ||
+ | after create</ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | <th scope=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | <th scope=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | <td>1 per node type</ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | <th scope=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | <th scope=" | ||
+ | < | ||
+ | name</ | ||
+ | < | ||
+ | name</ | ||
+ | < | ||
+ | name</ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | <th scope=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | <tr> | ||
+ | | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | | ||
+ | < | ||
+ | <th scope=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | <th scope=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | name of node owner</ | ||
+ | < | ||
+ | </ | ||
+ | <tr> | ||
+ | | ||
+ | | ||
+ | < | ||
+ | module fields< | ||
+ | no object</ | ||
+ | < | ||
+ | module fields< | ||
+ | no object</ | ||
+ | < | ||
+ | module fields< | ||
+ | no object</ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | loaded object</ | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | <th scope=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | <th scope=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | | ||
+ | < | ||
+ | <th scope=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | module fields< | ||
+ | no object< | ||
+ | valid nid </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | <th scope=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | <th scope=" | ||
+ | < | ||
+ | < | ||
+ | name</ | ||
+ | < | ||
+ | name</ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | <th scope=" | ||
+ | < | ||
+ | < | ||
+ | module fields< | ||
+ | no object</ | ||
+ | < | ||
+ | < | ||
+ | loaded object</ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | <th scope=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | <tr> | ||
+ | | ||
+ | | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | <th scope=" | ||
+ | < | ||
+ | < | ||
+ | module fields< | ||
+ | no object</ | ||
+ | < | ||
+ | module fields< | ||
+ | no object</ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | < | ||
+ | <th scope=" | ||
+ | | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | <th scope=" | ||
+ | | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | <th scope=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | <th scope=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | <th scope=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | <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</ | ||
+ | </ | ||
+ | < | ||
+ | <th scope=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
- | This description seems complete. | + | </ |
+ | ===== Notes ===== | ||
+ | The difference between ' | ||
- | ===== Node creation ===== | + | * " |
+ | * " | ||
+ | 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/< | + | |
- | + | ||
- | ==== 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 | + | |
- | * hook_nodeapi(' | + | |
- | * Insert part | + | |
- | * hook_nodeapi(' | + | |
- | * hook_insert. Node contains form fields, mixing builtin fields and module | + | |
- | * 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/ | + | |
+ | Similarly, any call to [[http:// |
dr/api_sequences.1129489464.txt.gz · Last modified: 2020/11/23 17:23 (external edit)