In Drupal 7 (and Drupal 6?), What triggers the hook call process, or where are the top-level hooks?
As I understand the Drupal module system, any module is able to create a hook for the implementation of another module. This means that most of Drupal's execution is modules that implement hooks for other modules, which in turn provide hooks for other modules for implementation.
I donβt understand if there is a top-level initial hook that is called in the bootstrap to disable this process or if there are several non-modular calls that start the hook call process or something else (apologies is uncertain and new, but as I already said i don't understand)
I looked in the _drupal_bootstrap_full function, and at the end there was a promising
module_invoke_all('init');
However, in my search in the modules/ folder, there was only one function called βinitβ hook, which did not seem to be a launch point
system/system.api.php 1737:function hook_init() { function hook_init() { drupal_add_css(drupal_get_path('module', 'book') . '/book.css'); }
So, this tells me that something outside of modular systems discards it all. This happens in one place or in several places. And where are these places?
I am currently not a heavy Drupal user. My ultimate goal here is to understand the Drupal module system in isolation , so I can then research and understand how Drupal uses its modules, building an application that 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 that you do not need this knowledge to use Drupal, but my brain is broken and will not allow me to move forward until I find out what the basic PHP code does.