Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Per suggestion by merlinofchaos - much of Drupal core has been updated (especially by Crell, and also by me and others) so that form builder functions are denoted with @ingroup forms. The only problem - this group is not defined in the doxygen, so the group does not appear on the API site as was intended.
Attached patch is my wild stab at this - someone who knows more about doxygen should take a look.
Comment | File | Size | Author |
---|---|---|---|
#9 | forms-groups-195283-9.patch | 1.33 KB | pwolanin |
#7 | forms-groups-195283-7.patch | 1.34 KB | pwolanin |
#4 | forms-groups-195283-4.patch | 977 bytes | pwolanin |
forms-groups.patch | 858 bytes | pwolanin | |
Comments
Comment #1
webchickWoo, documentation. Could we please have an example in here too? The description itself is a bit jargon-y.
I found this in user_pass() which seems like it'd work as an example:
Comment #2
Crell CreditAttribution: Crell commentedI am not a Doxygen expert so I don't know if the above will work as intended, but +1 if it does. :-) (I don't know how to test this without setting up a full api.module site.)
I don't think we can do comments within comments, so I don't know how to properly format an example here. However, I would suggest a text change:
"All core modules should declare their form builder functions..." should not say just core. Contrib should be held to the same standards as core, including the OCD use of API documentation. :-) "All modules should declare..."
Comment #3
Crell CreditAttribution: Crell commentedAlso setting to normal, since a large chunk of api.drupal.org not working as desired is non-minor.
Comment #4
pwolanin CreditAttribution: pwolanin commentedwell, looks like my WAG about escaping the @ was correct for the doxygen standard: http://www.stack.nl/~dimitri/doxygen/commands.html#cmdat
but as far as I can tell, the api module doesn't support escaping:
$documentation = preg_replace('!@see ([a-zA-Z0-9_]+) (.*?) \n!', str_replace('%24', '$', l('$2', 'api/group/$1/'. $branch_name)), $documentation);
so, the attached patch references a couple example functions but doesn't try to spell it out.
Comment #5
drummThe two groups with similar identifiers might be a bit confusing.
Since there is a description of how to do something, an example would be good. Some user-facing documentation, in addition to the instructuions for core developers, would be good.
Use one space between sentences, not two.
Go ahead and write the documentation as it should be. Not properly parsing escaped @ is a bug and should be fixed in API module instead of degrading documentation quality to work around it.
Comment #6
pwolanin CreditAttribution: pwolanin commentedThe choice of group "forms" was not mine - I could even roll a patch to make it "form-builders" or some such?
Comment #7
pwolanin CreditAttribution: pwolanin commentedper a long-ago IRC conversation with drumm and comments above, renaming the "form" group to "form_api" and adding more to the docs.
Comment #8
pwolanin CreditAttribution: pwolanin commentedoops
Comment #9
pwolanin CreditAttribution: pwolanin commentedremoving the word "core" per Crell above.
Comment #10
chx CreditAttribution: chx commentedI think this is good to go.
Comment #11
Gábor HojtsyComitted, thanks.
Comment #12
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.