On #2148255: [meta] Make better D8 api.d.o landing page, linked to high-level overview topics, and put it in Core api.php files, we made a patch that included a stub Topic page for api.drupal.org (i.e., a @defgroup) titled:
Extending Drupal
This can be found in file core/modules/system/core.api.php where it says
@defgroup extending
The documentation to go on this page needs to be written. The idea is:
a) Write a few paragraphs about the topic.
b) Link to more detailed documentation on
https://drupal.org/developing/api/8
c) If the more detailed documentation does not yet exist, create stub page(s), link to the stub pages, and add a note to this issue stating that the stub pages need to be filled out.
d) If the topic has related classes, interfaces, and functions -- appropriate for an overview -- add
@ingroup extending
to their documentation headers. That will make these classes etc. show up on the Topic page on api.drupal.org. Only include classes/functions that are appropriate for an overview page please!
For more info -- documentation standards for @defgroup/@ingroup:
https://drupal.org/coding-standards/docs#defgroup
Comment | File | Size | Author |
---|---|---|---|
#6 | interdiff.txt | 4.59 KB | jhodgdon |
#6 | 2216561-extending-docs-6.patch | 7.77 KB | jhodgdon |
Comments
Comment #1
jhodgdonComment #2
jhodgdonActually this is probably the next one that should be written. I'll tackle tomorrow.
Comment #3
jhodgdonHere's a first pass on this docs. Reviews/criticism/suggestions welcome! I also made an edit of the Hooks topic, which was pretty outdated, and is referenced by this topic, and added a new topic for Plugins, which we didn't have.
Comment #4
jhodgdonOh. No one has reviewed this yet. Added one @see to the end of the hooks topic.
Comment #5
eojthebraveThis is looking great. Thanks for taking the time to write this up and to update the existing hooks section. I have just a few comments, all of which are just my gut reaction to the documentation so feel free to ignore them if you don't agree. With the exception of one missing period, and what I think is a critical link that should be added. :)
I think we need to make sure and explain "module's short name" and how I know what that is for my module. Might even be worthwhile to provide an example mapping "example_module.info" to example_module_batch_alter().
Think it's worth adding something that explains why a module might want to "invoke" a hook? Making it possible for other module's to extend your own module, etc.
Missing period at end of line.
Missing period at end of line.
I think something like "Extending and Altering Drupal with Modules" or even just "Module basics" might be a better title for this section. Right now it doesn't tell me that this is also about "extending".
This sentence can probably be simplified to just "Here is a list of ways that modules can alter or extend ...". It seems a little wordy as is. But that's just my gut reaction.
The note about sub-types and hooks doesn't seem necessary here. I feel like we can just explain that in the entity api docs.
I think we should add a link to https://drupal.org/developing/modules/8 in this section.
Comment #6
jhodgdonMany thanks for the good suggestions! Here's a new patch addressing all of the poins in #5, I think, except:
#3 - Incorrect, @defgroup line does not end in . -- see https://drupal.org/node/1354#defgroup
#5 - I decided it didn't really need a section header. This doc block is only 2 bullet lists anyway.
Comment #7
jhodgdonComment #8
eojthebraveThis looks good to me. Thanks for fixing up those couple of nit-picks.
Comment #9
jhodgdonThe issue summary got deleted in #5 by mistake ?!? whoops.
Comment #10
jhodgdonUnassigning to avoid "jennifer is committing" vs. "jennifer did this patch" confusion in the RTBC committer queue.
Comment #11
webchickOMFG that is so much better I can't even explain it. I especially like having a nice list of "extension points" for Drupal 8, since this is a lot different than in 7 and below. Great work!
Committed and pushed to 8.x. Thanks!
Comment #12
jhodgdonThis didn't actually get committed/pushed, I think?
Comment #14
jhodgdonThanks! That is more convincing (see #13). :)