More information on the data structure of these parameters would be helpful.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

Title: Documentation problem with menu_tree_data » menu_tree_data doc needs more detail

OK. Someone will need to research this and figure out what the data structure is.

There's another minor problem with this docblock: in the @return, menu_tree_page_data function name should have () after it so it turns into a link on api.drupal.org

jhodgdon’s picture

Status: Active » Needs review
FileSize
2.04 KB

Here's a patch. Definitely needs a review...

jhodgdon’s picture

Version: 7.x-dev » 8.x-dev

8.x now

jhodgdon’s picture

#2: 1050606.patch queued for re-testing.

jhodgdon’s picture

#2: 1050606.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 1050606.patch, failed testing.

jhodgdon’s picture

Issue tags: +Novice, +Needs backport to D7

Looks like this needs a reroll. Probably a good novice project? Then needs a review...

bxtaylor’s picture

Rerolled.

bxtaylor’s picture

Status: Needs work » Needs review
jhodgdon’s picture

Thanks for the reroll! Someone other than me needs to review the text in the patch also for accuracy and clarity (since I wrote the original patch, I cannot review it). Would you like to comment on the patch text?

bxtaylor’s picture

Ah yes! It gets kinda lonely in an issue all by yourself ; ) I'll review the text. Should I just mark as reviewed when done?

bxtaylor’s picture

What's the standard for paragraph spacing in comments? Sometimes there's an extra line, sometimes not.

* @param $parents
 *   An array of the menu link ID values that are in the path from the current
 *   page to the root of the menu tree.
 * @param $depth
 *   The minimum depth to include in the returned menu tree.
 *  <-----  This is an extra line
 * @return
 *   An array of menu links in the form of a tree. Each item in the tree is an
 *   associative array containing:
 *   - link: The menu link item from $links, with additional element
 *     'in_active_trail' (TRUE if the link ID was in $parents).
bxtaylor’s picture

Nevermind, I read somewhere else in the core issue queue that it is standard for an extra line to be in between the @param and the @return. Still reviewing the text in the patch.

jhodgdon’s picture

The standards for formatting of documentation blocks are at:
http://drupal.org/node/1354

Thanks for reviewing!

xjm’s picture

Status: Needs review » Reviewed & tested by the community

Thanks @bxtaylor.

bxtaylor’s picture

No problem @xjm. After review, the patch text makes sense to me and looks accurate.

cleverington’s picture

Ditto on the clarity! Nice, simple, and direct!

catch’s picture

Version: 8.x-dev » 7.x-dev

This looks like a good improvement to me. Committed to 8.x and moving back to 7.x for webchick.

jhodgdon’s picture

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 7.x. Thanks!

Status: Fixed » Closed (fixed)
Issue tags: -Novice, -Needs backport to D7

Automatically closed -- issue fixed for 2 weeks with no activity.