[documentation] [Documentation task] distinguish the node type hooks from the usual hooks

pwolanin drupal-docs at drupal.org
Sat Jan 6 03:15:41 UTC 2007


Issue status update for 
http://drupal.org/node/107225
Post a follow up: 
http://drupal.org/project/comments/add/107225

 Project:      Documentation
 Version:      <none>
 Component:    Developer Guide
 Category:     tasks
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  pwolanin
 Updated by:   pwolanin
 Status:       patch (ready to be committed)

Also, where is the wording at the top of this page defined: 
http://api.drupal.org/api/HEAD/group/hooks


There is a typo, and also this will need to be updated to explain
functor_ as much or more than the intro to node.php.




pwolanin



Previous comments:
------------------------------------------------------------------------

Sat, 06 Jan 2007 01:50:48 +0000 : pwolanin

Attachment: http://drupal.org/files/issues/hook-to-functor.diff (10.67 KB)

Per a recent discussion on the devel list about the confuncion between
node "hooks" (which are only called for the module defning the node
type) and normal hooks (called for all modules), came this suggestion
from chx:


http://lists.drupal.org/pipermail/development/2007-January/021677.html


Accordingly,  a patch is attached for the HEAD developer docs.  


If you don't like "functor" then remake the patch with something else
ASAP.




------------------------------------------------------------------------

Sat, 06 Jan 2007 02:01:26 +0000 : webchick

Hm. Problem is, this will still show up as "hook" documentation. I
wonder if we want a separate area to describe functors... $form_id
.'_validate' and such qualify as well, and it would be nice to get those
documented too.




------------------------------------------------------------------------

Sat, 06 Jan 2007 02:18:19 +0000 : pwolanin

I don't think the form callbacks are ever termed "hooks", are they?


Also, they are still hooks. The suggestion was really just using a
different name placeholder to distinguish them from the usual module
hooks new developers.


My only other suggestion instead of "functor" would be "nook" = "node
hook"




------------------------------------------------------------------------

Sat, 06 Jan 2007 02:35:12 +0000 : webchick

Haha, -1 to nook. ;)


Hm. When I was in IRC, I understood the definition of "functor" (the
way Drupal's using it) to be "a callback function where the prefix is
known and the suffix is one of a select list." So it seems like FAPI
callbacks would fall into that too. Not sure though.


chx???? :P




------------------------------------------------------------------------

Sat, 06 Jan 2007 02:38:24 +0000 : pwolanin

Attachment: http://drupal.org/files/issues/hook-to-nook.diff (10.7 KB)

Are you sure you don't like nook?




------------------------------------------------------------------------

Sat, 06 Jan 2007 03:11:15 +0000 : pwolanin

Attachment: http://drupal.org/files/issues/hook-to-functor_2.diff (10.97 KB)

slighly better wording, again using "functor"






More information about the documentation mailing list