Skip to content
Snippets Groups Projects
Commit 20b62b29 authored by Angie Byron's avatar Angie Byron
Browse files

#1022172 by montesq: Fixed Missing return in example hook_menu code

parent ae433184
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -925,6 +925,7 @@ function hook_menu_get_item_alter(&$router_item, $path, $original_map) { ...@@ -925,6 +925,7 @@ function hook_menu_get_item_alter(&$router_item, $path, $original_map) {
* $items['abc/def'] = array( * $items['abc/def'] = array(
* 'page callback' => 'mymodule_abc_view', * 'page callback' => 'mymodule_abc_view',
* ); * );
* return $items;
* } * }
* *
* function mymodule_abc_view($ghi = 0, $jkl = '') { * function mymodule_abc_view($ghi = 0, $jkl = '') {
...@@ -953,6 +954,7 @@ function hook_menu_get_item_alter(&$router_item, $path, $original_map) { ...@@ -953,6 +954,7 @@ function hook_menu_get_item_alter(&$router_item, $path, $original_map) {
* 'page callback' => 'mymodule_abc_view', * 'page callback' => 'mymodule_abc_view',
* 'page arguments' => array(1, 'foo'), * 'page arguments' => array(1, 'foo'),
* ); * );
* return $items;
* } * }
* @endcode * @endcode
* When path 'abc/def' is requested, the page callback function will get 'def' * When path 'abc/def' is requested, the page callback function will get 'def'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment