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.
API page: http://api.drupal.org/api/drupal/modules--block--block.module/function/b...
In the page there are some HTML tags that appear as plain text.
> @todo Now that the blocks table has a primary key, we should use that as the array key instead of
<i>module</i>_<i>delta</i><code>.
> An array of block objects, indexed with <code><i>module</i>_<i>delta</i>
.
Comment | File | Size | Author |
---|---|---|---|
#17 | blockModuleDocs-1175614-17.patch | 1.06 KB | aenw |
#14 | blockModuleDocs-1175614-14.patch | 1.06 KB | cashwilliams |
#7 | block_module_doc-1175614-7.patch | 1.06 KB | oriol_e9g |
#3 | block_module_doc-1175614-3.patch | 843 bytes | barbi |
Comments
Comment #1
apadernoThe issue is present in the documentation pages for Drupal 7 and Drupal 6.
Comment #2
jhodgdonThe HTML tags should not be there. Please patch 8.x/7.x first, then backport to 6.x. Good project for a novice doc contributor!
Comment #3
barbi CreditAttribution: barbi commentedRemoved the HTML tags.
I assumed the word is module_delta.
Comment #4
joachim CreditAttribution: joachim commentedThe intent of the <i> tags was to show that the words module and delta are merely placeholders. That's not as clear with the changes in the patch -- I mean I would hope nobody would think the array is keyed with the literal string 'module_delta' all the way as that would be silly, but still, it's less clear.
When using placeholders in issue comments or documentation I tend to write in caps, so MODULE_DELTA, but I don't know if this is standard in core, or whether that's sufficiently clear as being two things stuck together.
I'd suggest maybe $module_$delta, or maybe explicitly stating what we're doing, like this:
* An array of block objects, indexed with the module name and block delta concatenated with an underscore, thus: $module_$delta.
Or... more simply, is there doxygen markup for emphasis?
Comment #5
jhodgdonAll caps is the standard way in doc to indicate a placeholder, for better or for worse, so let's go with that.
Also, in the patch -- when you remove the i tags, you need to fix the word wrapping so that the lines wrap to as close to 80 characters as possible. Thanks!
Comment #6
joachim CreditAttribution: joachim commented> All caps is the standard way in doc to indicate a placeholder, for better or for worse, so let's go with that.
Ok. I would like to see some textual explanation too though, so it's clear that it's two placeholders not one.
Comment #7
oriol_e9gmaybe this?
Comment #8
oriol_e9gComment #9
joachim CreditAttribution: joachim commentedYup, that's spot on :)
Comment #10
jhodgdonLooks good to me too, thanks! Please 8.x/7.x, and then mark to be ported for d6.
Comment #11
webchickYeah, MODULE_DELTA isn't great, but it is how we do similar stuff elsewhere (e.g. hook_form_FORM_ID_alter()). So this looks good.
Committed to 8.x and 7.x. Thanks! Marking back for 6.x. Seems to apply with fuzz.
Comment #12
joachim CreditAttribution: joachim commented> hook_form_FORM_ID_alter
Heh, that actually means that's wrong -- it should be FORMID, if _ indicates a separation between pseudotokens...
Comment #13
jhodgdonWe probably should port the patch just in case...
Comment #14
cashwilliams CreditAttribution: cashwilliams commentedpatch for 6.x
Comment #15
jhodgdonThanks! Small typo: should be MODULE_DELTA not MODULE_DETA.
Comment #16
oriol_e9gComment #17
aenw CreditAttribution: aenw commentedfixed typo
Comment #18
jhodgdonLooks good now, thanks!
Comment #19
Gábor HojtsyThanks, committed, pushed.