[development] The new menu system

John VanDyk jvandyk at iastate.edu
Tue Sep 26 14:50:28 UTC 2006


>At 9:44 AM -0500 9/26/06, John VanDyk wrote:
>>this new system gets rid of the $may_cache switch in hook_menu(). 
>>hook_menu is now called only upon module enable/disable and 
>>admin/menu. this is outstanding. however, we no longer have a place 
>>to stick our drupal_add_css() and drupal_add_js() type calls.
>>
>>so, lets create a new hook_signal($op) which fires at various 
>>points during a request. Initially, it replace hook_init() and 
>>hook_exit() with $op=precache, $op=postcache, and $op=exit. We 
>>shall also add $op=postbootstrap  which is where the drupal_add_css 
>>calls will go.

This is an unneeded level of abstraction. We already have signals 
that fire at various points during a request. They are called hooks. 
They are faster and more descriptive than hook_signal($op).

hook_precache
hook_postcache
hook_exit

etc.


More information about the development mailing list