This looks like a good start! A few things to fix:
a)
+ * Path: admin/structure/trigger or admin/structure/trigger/(module)
- Use a list here rather than "or".
- Use the actual %whatever path specification from trigger_menu() rather than (module).
b)
+ * @param $hook
+ * The hook that called this function
+ * @param $edit
+ * Edit variable passed in to the hook or empty array if not needed
+ * @param $account
+ * Account variable passed in to the hook
+ * @param $method
+ * Method variable passed in to the hook or NULL if not needed
All of these param descriptions need to end in "."
c) There's one method in the trigger.test file that needs its verb fixed and isn't in this patch:
We need to check what we did for some other modules that do something similar that have gone through this doc cleanup process. I think it may have been something like:
- admin/structure/trigger/MODULE, where MODULE is the machine name of a module
or maybe it was $module, since you could search for that in your code editor or browser? Anyway, we should try to be consistent with the other modules that do this (can't remember right now which ones they would be?).
I think that is fine. We usually don't want '', but if you're going to concatenate with a variable, then '' makes sense. So although they're not quite parallel, I think the doc is clear and easily readable, which is the main objective after all.
Oops, I just noticed this:
- * @ingoup forms
* @see trigger_assign_form_validate()
* @see trigger_assign_form_submit()
+ * @ingoup forms
ingoup -> ingroup (unless the Forms page is a pile of goup? :) )
Also this:
+ * @return
+ * Array of all triggers
Needs . at end of triggers.
Those are just two little fixes though... so to save time for everyone, I just edited the patch file directly and I think we're good to go.
Comments
Comment #1
chris.leversuch commentedFirst attempt
Comment #2
jhodgdonThis looks like a good start! A few things to fix:
a)
- Use a list here rather than "or".
- Use the actual %whatever path specification from trigger_menu() rather than (module).
b)
All of these param descriptions need to end in "."
c) There's one method in the trigger.test file that needs its verb fixed and isn't in this patch:
That's all I saw -- good effort!
Comment #3
chris.leversuch commentedFor a), there isn't a %whatever path, the module actually does a foreach loop and defines paths for each module:
Should I just use admin/structure/trigger/% in the doc?
Think I've covered the rest of your comments.
Comment #4
jhodgdonWe need to check what we did for some other modules that do something similar that have gone through this doc cleanup process. I think it may have been something like:
- admin/structure/trigger/MODULE, where MODULE is the machine name of a module
or maybe it was $module, since you could search for that in your code editor or browser? Anyway, we should try to be consistent with the other modules that do this (can't remember right now which ones they would be?).
Comment #5
chris.leversuch commentedThe update to node.module used:
Path: 'node/add/' . $type_url_str (part of a foreach)
Couldn't find any other examples from a quick search.
Comment #7
chris.leversuch commented#3: 1379126-trigger_module_clean_up-1.patch queued for re-testing.
Comment #8
jhodgdonOK let's use that model then. Two modules doing it = a pattern. :)
Comment #9
chris.leversuch commentedIs the following OK? Not sure if both should have ' ' or neither?
+ * Path:
+ * - admin/structure/trigger
+ * - 'admin/structure/trigger/' . $module (part of a foreach)
Comment #10
jhodgdonI think that is fine. We usually don't want '', but if you're going to concatenate with a variable, then '' makes sense. So although they're not quite parallel, I think the doc is clear and easily readable, which is the main objective after all.
Oops, I just noticed this:
ingoup -> ingroup (unless the Forms page is a pile of goup? :) )
Also this:
Needs . at end of triggers.
Those are just two little fixes though... so to save time for everyone, I just edited the patch file directly and I think we're good to go.
Comment #11
xjmInstead of committing this, we'll likely want to create a D7-only version of this patch pending #764558: Remove Trigger module from core.
Comment #12
xjmPostponing this on #764558: Remove Trigger module from core.
Comment #13
xjmAlright, let's port a D7 version of this now that Trigger is not in D8.
Comment #14
albert volkman commentedD7 backport.
Comment #15
xjmThis needs to have the "new" callback standards removed from the patch, as well as the
Path:lines (see recent discussion in #1315992: No standard for documenting menu callbacks).Comment #16
albert volkman commentedSomething like this? (also found a misspelling... "@ingoup" instead of "@ingroup")
Comment #17
xjmLOL @ "ingoup".
Everything in the patch looks fine for backport now.
Note for reviewers: I verified that the following changes are correct; the parameters in D7 are called
$hookand not$op.Comment #18
albert volkman commentedRe-reading this issue and saw that jhodgdon had already pointed out the ingoup misspelling in #10 :-)
Comment #19
webchickCommitted and pushed to 7.x. Thanks!