Closed (fixed)
Project:
Documentation
Component:
Developer Guide
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
9 Nov 2005 at 20:23 UTC
Updated:
5 Jan 2007 at 07:27 UTC
Jump to comment: Most recent file
The following functions need documentation:
hook_form_alter()
hook_form_validate_alter()
hook_form_execute_alter()
Additionally, I've noticed that the following hook documentation needs to be updated to use the new Forms API for 4.7:
hook_block()
hook_settings()
hook_user()
This isn't meant to be a complete list, just a starting point. Please add any other hooks you may find.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | hooks_docs.patch | 4.26 KB | drewish |
Comments
Comment #1
chx commentedhook_nodeapi op validate changed, prepare and execute are new. there are similar hooks I suppose.
Comment #2
drewish commentedParameters for form hooks
I'm assuming that the values all have to be by reference...
Possible values for $op in hook_nodeapi()
These are what I've found greping through node.module (I've grouped them in what appeared to be a logical order to me):
Can someone confirm this?
Comment #3
drewish commentedHere's a basic patch that adds prototypes for the new hooks and converts some of the form api code.
Comment #4
drewish commentedLooks like most of the _alter hooks are going to be removed...
http://drupal.org/node/38349
Comment #5
drewish commentedAdd: form_alter
hook_form_alter($form_id, &$form_values)Possible values for $op in hook_nodeapi()
These are what I've found greping through node.module (I've grouped them in what appeared to be a logical order to me):
Node Hooks (need to verify these)
1. prepare
2. form (return an array)
3. validate (you can only validate here, no changes possible)
4. execute (prepare the node for save)
5. insert/update
Comment #6
drewish commentedeh, crap, didn't mean to post that. i was working on some notes.
Comment #7
sepeck commentedre-open i fthis is still true.