[development] The new menu system
James Walker
walkah at walkah.net
Tue Sep 26 15:04:51 UTC 2006
On 26-Sep-06, at 10:50 AM, John VanDyk wrote:
>> 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
i agree... but also - none of those makes it clear to me *at all*
that I should be putting my add_js/add_css code in them.
--
James Walker :: http://walkah.net/ :: xmpp:walkah at walkah.net
More information about the development
mailing list