Note that there are some explanatory texts on larger screens.

plurals
  1. POWhere is Drupal's Module Hook Calling Started?
    primarykey
    data
    text
    <p>In a Drupal 7 (and Drupal 6?) system, what "kicks off" the hook calling process, or where are "top level" hook calls located?</p> <p>As I currently understand the Drupal module system, any module is capable of creating a hook for another module to implement. That means much of Drupal's execution is modules implementing hooks for other modules, which in turn provide hooks for other modules to implement. </p> <p>What I'm not clear on is if there's a initial, top level hook that gets called in the bootstrap to kick this process off, or if there's several non-module calls that kick-off the hook invoking process, or something else (apologies is this is vague and newbish, but like I said I don't understand)</p> <p>I looked in the <code>_drupal_bootstrap_full</code> function, and at the end there was a promising</p> <pre><code>module_invoke_all('init'); </code></pre> <p>However, my search of the <code>modules/</code> folder only turned up one "init" hook function, which didn't appear to be a kick off point</p> <pre><code>system/system.api.php 1737:function hook_init() { function hook_init() { drupal_add_css(drupal_get_path('module', 'book') . '/book.css'); } </code></pre> <p>So, that says to me something outside the module systems kicks this whole things off. Does this happen in a single place, or multiple places. And where are these places?</p> <p>I'm not currently a heavy Drupal user. My end goal of all this is understanding Drupal's module system <strong>in isolation</strong>, so that I can then investigate and understand how Drupal uses it's modules the build the application most people think of as Drupal. Any/all explanations are welcome, but I'm trying to understand things from an architectural point of view. I understand you don't need this knowledge to use Drupal, but my brain is broken and won't let me move forward until I know what the base PHP code is doing. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload