User Tools

Site Tools


dr:api_sequences

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dr:api_sequences [2005/10/23 11:36] – corrected and extended fgmdr:api_sequences [2020/11/23 17:23] (current) – external edit 127.0.0.1
Line 4: Line 4:
  
 ... 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]] ... 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 =====
  
 <html> <html>
 +
 <style type="text/css"> <style type="text/css">
   body { font-size:small }   body { font-size:small }
 +  th, td { vertical-align: top }
   th[scope="row"] { font-weight: normal; font-family:"Courier New", Courier, mono ; text-align: left}   th[scope="row"] { font-weight: normal; font-family:"Courier New", Courier, mono ; text-align: left}
   td { vertical-align:top; text-align:center }   td { vertical-align:top; text-align:center }
Line 13: Line 18:
 <table cellspacing="0" cellpadding="0" border="1"> <table cellspacing="0" cellpadding="0" border="1">
   <tr>   <tr>
-    <th>Sequence of hooks fired</th>+    <th><span class="search_hit">Sequence</span> of <span class="search_hit">hooks</span> fired</th>
     <th>1: New</th>     <th>1: New</th>
     <th width="119">2: Preview</th>     <th width="119">2: Preview</th>
Line 22: Line 27:
     <th>5: Redirect <br>     <th>5: Redirect <br>
     after create</th>     after create</th>
-    <th>6 View node</th>+    <th>6View node</th>
     <th>7: Edit node</th>     <th>7: Edit node</th>
     <th>8: Track node </th>     <th>8: Track node </th>
Line 115: Line 120:
     <td>&nbsp;</td>     <td>&nbsp;</td>
     <td>no uid<br>     <td>no uid<br>
-      name</td>+      name of node owner</td>
     <td>&nbsp;</td>     <td>&nbsp;</td>
   </tr>   </tr>
Line 285: Line 290:
   </tr>   </tr>
   <tr>   <tr>
-    <th scope="row">hook_name</th>+    <th scope="row">hook_node_name</th>
     <td>X</td>     <td>X</td>
     <td>X</td>     <td>X</td>
Line 318: Line 323:
   </tr>   </tr>
   <tr>   <tr>
-    <th scope="row">hook_help</th> +    <th scope="row">hook_help('node/...')</th> 
-    <td>node/add/&lt;node type&gt;</td> +    <td>add/&lt;node type&gt;</td> 
-    <td>node/add/&lt;node type&gt;</td> +    <td>add/&lt;node type&gt;</td> 
-    <td>node/add/&lt;node type&gt;</td> +    <td>add/&lt;node type&gt;</td> 
-    <td>node/add/&lt;node type&gt;</td> +    <td>add/&lt;node type&gt;</td> 
-    <td>node/&lt;nid&gt;</td> +    <td>&lt;nid&gt;</td> 
-    <td>node/&lt;nid&gt;</td> +    <td>&lt;nid&gt;</td> 
-    <td>node/&lt;nid&gt;/edit</td> +    <td>&lt;nid&gt;/edit</td> 
-    <td>node/&lt;nid&gt;/track</td>+    <td>&lt;nid&gt;/track</td>
   </tr>   </tr>
 </table> </table>
-<p>The difference between &quot;modules fields&quot; and &quot;loaded object&quot; occurs if the +
-  module defines the additional fields it handles as fields as wrapped in an +
-  object (as I describe <a href="http://blog.riff.org/index.php/2005/10/10/29-drupal-tips-hook_load-and-data-isolation">elswehere</a>). </p> +
-  <ul> +
-    <li>&quot;Module fields&quot; is just a set of array entries made available, intermixed +
-  with the builtin array entries</li> +
-    <li>&quot;loaded object&quot; referes the same, but when they are returned by core as the +
-  wrapper object. </li> +
-  </ul> +
-<p>Basically, modules fields are returned from a HTML form, whereas a loaded +
-  object comes from the DB. </p> +
-<p>Of course, any additional calls done by the module will appear somewhere in +
-  between these. For instance, helpdesk loads the information about a contract'+
-  customer, which is a drupal USER, so hook_user('load') is fired from the module. +
-  Similarly, any call to <a href="http://drupaldocs.org/api/head/function/l">l()</a> causes +
-  <a href="http://drupaldocs.org/api/head/function/hook_link">hook_link</a> to be fired too. </p>+
 </html> </html>
 +
 +===== Notes =====
 +
 +The difference between 'modules fields' and 'loaded object' occurs if the module defines the additional fields it handles as fields as wrapped in an object [[http://blog.riff.org/index.php/2005/10/10/29-drupal-tips-hook_load-and-data-isolation|elswehere]]
 +
 +  * "Module fields" is just a set of array entries made available, intermixed with the builtin array entries
 +  * "Loaded object" refers the same, but when they are returned by core as the wrapper object.
 +
 +Basically, modules fields are returned from a HTML form, whereas a loaded object comes from the DB.
 +
 +Of course, any additional calls done by the module will appear somewhere in between these. For instance, helpdesk loads the information about a contract's customer, which is a drupal USER, so <code>hook_user('load')</code> 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.
dr/api_sequences.1130067405.txt.gz · Last modified: 2020/11/23 17:23 (external edit)