Issue #1168686 by barbi, Dave Reid: Fixed hook_menu() doc should say how to pass integer arg to callbacks.

merge-requests/26/head
webchick 2011-06-08 21:57:57 -07:00
parent 8458100467
commit e45c780324
1 changed files with 5 additions and 2 deletions

View File

@ -947,8 +947,11 @@ function hook_menu_get_item_alter(&$router_item, $path, $original_map) {
* called, the corresponding path components will be substituted for the * called, the corresponding path components will be substituted for the
* integers. That is, the integer 0 in an argument list will be replaced with * integers. That is, the integer 0 in an argument list will be replaced with
* the first path component, integer 1 with the second, and so on (path * the first path component, integer 1 with the second, and so on (path
* components are numbered starting from zero). This substitution feature allows * components are numbered starting from zero). To pass an integer without it
* you to re-use a callback function for several different paths. For example: * being replaced with its respective path component, use the string value of
* the integer (e.g., '1') as the argument value. This substitution feature
* allows you to re-use a callback function for several different paths. For
* example:
* @code * @code
* function mymodule_menu() { * function mymodule_menu() {
* $items['abc/def'] = array( * $items['abc/def'] = array(