[development] Convention for naming contrib hooks?

Dave Reid dave at davereid.net
Fri Oct 16 20:03:42 UTC 2009


Not all hooks are invoked by module_invoke or module_invoke_all. They can
also be called manually with module_implements or by drupal_alter().
http://drupalcontrib.org/api/search/6/hook_ seems to display several pages
of contrib module hooks (once the functions begin with 'hook_').

Dave Reid
dave at davereid.net


On Fri, Oct 16, 2009 at 1:05 PM, Jennifer Hodgdon <yahgrp at poplarware.com>wrote:

> arthur wrote:
>
>> Do people feel like we're moving toward consensus that the contrib hook
>> standard ought to be hook_module_name_foo_bar()?
>>
>
> That would be a good start.
>
>  Secondly, do we want to identify a doxygen tag so that we can put together
>> a list of contrib hooks?
>>
>
> Let's first at least say that module developers whose modules use
> module_invoke or module_invoke_all to invoke a hook ought to document the
> hook in the first place. My non-scientific sample* of a few found zero that
> did.
>
> * Go to drupalcontrib.org, find the module_invoke or module_invoke_all
> function, and click through to some of the functions in contrib that call
> those two functions. Then search for the name of the implied hook. Find
> nothing. Of course, maybe drupalcontrib.org is not indexing *.api.php
> files, or I'm missing something?
>
>
>   --Jennifer
>
>
> --
> Jennifer Hodgdon * Poplar ProductivityWare
> www.poplarware.com
> Drupal, WordPress, and custom Web programming
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20091016/4849a254/attachment.html 


More information about the development mailing list