Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
documentation
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
26 Aug 2012 at 03:21 UTC
Updated:
4 Jan 2014 at 02:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
traviscarden commentedComment #2
Bußmeyer commentedHey TravisCarden,
Thank you for your patch. I have reviewed them.
function ajax_forms_test_menu() {is an implemetation of a hook. The params and return values should not be included. See: http://drupal.org/node/1354#hookimpl
This function defines a form, right? The return value is an array isn't it?
I created a new patch.
Regards,
Thomas
Comment #3
mcjim commentedThanks both for your patches.
Bußmeyer is right, implementations of a hook don't include the params and return values.
Form generating functions don't, either (well, not for $form and $form_state or the return value), so we can have just:
According to http://drupal.org/node/1354#forms, you can also add
@ingroup forms, which groups all forms into the Form Builder topic on api.drupal.org.So… almost there :-)
Comment #4
traviscarden commentedThank you both. @mcjim: This is just a test module. Do we
@ingroup formsfunctions in tests?Comment #5
pingers commentedFrom /core/modules
Seems a bit inconsistent re: @ingroup. Re-rolled without the change.
Comment #6
pingers commentedDoh. Test it!
Comment #7
mcjim commentedInteresting observation about use of @ingroup, pingers.
Looking at core/modules/system/tests/form_test, the term "Form constructor" is used 10 times but "@ingroup forms" only 5. But that's an inconsistency to be discussed in another issue.
I think this is good to go.
Comment #8
webchickThis looks right to me!
Committed and pushed to 8.x. Thanks!
Does this need backport to D7 as well?
Comment #9
jhodgdonLooks like it does need a backport. The file is
modules/simpletest/tests/ajax_forms_test.module
Comment #10
traviscarden commentedComment #11
traviscarden commentedA straight backport of a trivial patch can be RTBC'ed once it passes automated testing, no?
Comment #12
webchickLooks the same to me. :)
Committed and pushed to 7.x. Thanks!