http://api.drupal.org/api/function/hook_menu/6

There might be other stuff too. This one just happened to bite me today.

CommentFileSizeAuthor
#9 hook_menu_docs.patch978 bytesmatason

Comments

Barry Madore’s picture

Project: Documentation » Drupal core
Version: » 7.x-dev
Component: Documentation in CVS » documentation

Moving

lilou’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

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

webchick’s picture

Status: Closed (fixed) » Active
Issue tags: +Quick fix

Nope, sorry, what I mean is that in addition to other properties listed there like 'page callback' and such, there is also a 'file' property which needs documenting.

There is also a 'file path' property.

matason’s picture

Status: Active » Needs review

“file”: Optional. The name of the file containing the function referred to in either “page callback” or “page arguments”. If this file does not reside in your module directory you'll need to specify the path using “file path”.

“file path”: Optional. The path to the file referred to in “file”.

How's that?

alex ua’s picture

Status: Needs review » Active

@matason- You didn't actually attach a patch, so this should really remain marked "active".

matason’s picture

Okay, well thanks...

I'll apply for a CVS account and then I'll be able to submit a patch (unless I'm missing something but I can't seem to checkout contributions/docs/developer anonymously)

If in the meantime someone with CVS could submit a patch that'll be great.

alex ua’s picture

@matason - the api docs are being automatically generated (by and large) by comments within the modules themselves. Thus, you don't need access to "contributions/docs/developer" to make a patch against menu.api.php, you just need to make a patch against the head version of modules/menu/menu.api.php

http://api.drupal.org/api/file/modules/menu/menu.api.php/7/source

matason’s picture

Status: Active » Needs review
StatusFileSize
new978 bytes

Hey thanks Alex UA, I've attached a patch, hopefully it's useful!

Cheers,
Chris

catch’s picture

Project: Drupal core » Documentation
Version: 7.x-dev »
Component: documentation » Correction/Clarification
Status: Needs review » Needs work

There's no file in hook_menu() in Drupal 7 due to the registry unless I'm very much mistaken, so bumping down to Drupal 6 and the documentation queue.

add1sun’s picture

Project: Documentation » Drupal core
Version: » 6.x-dev
Component: Correction/Clarification » documentation

Er, any docs on api.drupal.org belong in the core queue where people with CVS accounts will actually take care of things. Moving it back. :p

webchick’s picture

Oops! catch is correct. These properties were removed in D7 in favour of the registry, so this only needs to be committed to the 6.x branch of contributions/docs/developer/hooks/core.php.

@matason: Yay! :D Thanks a lot! Is there any chance you'd want to expand your patching prowess to patch against that file rather than Drupal core? (Sorry about the confusion! :\)

matason’s picture

Hello webchick,

Yes certainly, I will apply for a CVS account this evening - I'd love to "expand my patching prowess" ;)

Best,
Chris

matason’s picture

I'm still waiting for a decision on my CVS application, will hopefully be able to dive in and make the patch soon!

matason’s picture

"There might be other stuff too."

There is, "title callback" along with "title arguments", adding as a reminder to document them also.

add1sun’s picture

@matason, just to be clear you don't need a CVS account to create a patch.

jhodgdon’s picture

Status: Needs work » Fixed

This issue appears to have been fixed by someone else wheile working on another patch, I would guess. In any case, the file and file path components of hook_menu() are currently documented on api.drupal.org.

Status: Fixed » Closed (fixed)

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