By chinni12 on
I am trying to understand apis. Documentation shows following apis
http://api.drupal.org/api/group/hooks/6
hook_access developer/hooks/node.php Define access restrictions.
hook_action_info developer/hooks/core.php Declare information about one or more Drupal actions.
hook_block developer/hooks/core.php Declare a block or set of blocks.
I have two of the questions.
1. Where is core.php located? I can't find it any where.
2. Is there function hook_access()? I read that method name is "modulename"_hookname(). I got confused .
Appreciate any help.
Chinni
Comments
hook_hookname() (ex:
hook_hookname() (ex: hook_access()) is the generic name. To actually implement a hook in a module you would write a function of the form modulename_hookname(). So if your module was called 'somemodule' and you wanted to implement hook_access(), you would write a hook called somemodule_access() and of course specify the arguments approriate for the hook.
hook
Thanks a lot for explanation.