List Info

Thread: Understanding the hook system




Understanding the hook system
user name
2006-03-22 13:10:33
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
Understanding the hook system
user name
2006-03-23 09:48:31

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?



On 3/22/06, Nathan Digriz <gmail.com">nathandigrizgmail.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

Understanding the hook system
user name
2006-03-23 16:56:18
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 <nathandigrizgmail.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/5
5243
>         
>         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
>         
> 

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )