[development] [developement] Understanding the hook system

Darrel O'Pry dopry at thing.net
Thu Mar 23 16:56:18 UTC 2006


On Thu, 2006-03-23 at 10:48 +0100, Nathan Digriz wrote:
> Another question I have is why does node_invoke exist if
> module_invoke_all does the same work? Does using node_invoke override
> the normal order of things? Do hooks that are created with a
> node_invoke go before or after the hooks created with
> module_invoke_all within the same module? 
> 
> 
> In other words what is the purpose of node_hook ? Can I use it to set
> a hook private to a module so that other than the ones I set?
> 
> An example would be could I set up and use node_invoke in a paypal
> module to create hooks so that only paypal framework module can see
> them? 

Node invoke exists to invoke a node type hook. Th code is unique from
module_invoke_all because it has the logic necessary for a module to
implement multiple node types.

There are probably some other parts to the equation. please correct me
if I'm wrong.


> 
> On 3/22/06, Nathan Digriz <nathandigriz at gmail.com> wrote:
>         I am not sure if this is development or document but I am
>         trying to get my head around hooks
>         
>         http://drupal.org/node/55243
>         
>         There does not seem to be any explaination of the differences
>         and when to use 
>         
>         system hooks
>         module hooks
>         node hooks
>         
>         Some type of example or chart would be appreciated also.
>         
>         Thanks
>         
> 



More information about the development mailing list