Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
aae9b822
Commit
aae9b822
authored
Oct 10, 2012
by
Jennifer Hodgdon
Browse files
Issue
#1802760
by mkadin, peterx: Document that menu_get_item() can return FALSE
parent
75035ae4
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/includes/menu.inc
View file @
aae9b822
...
...
@@ -434,12 +434,13 @@ function menu_set_item($path, $router_item) {
* Internal use only.
*
* @return
* The router item, an associate array corresponding to one row in the
* menu_router table. The value of key map holds the loaded objects. The
* value of key access is TRUE if the current user can access this page.
* The values for key title, page_arguments, access_arguments, and
* theme_arguments will be filled in based on the database values and the
* objects loaded.
* The router item or, if an error occurs in _menu_translate(), FALSE. A
* router item is an associative array corresponding to one row in the
* menu_router table. The value corresponding to the key 'map' holds the
* loaded objects. The value corresponding to the key 'access' is TRUE if the
* current user can access this page. The values corresponding to the keys
* 'title', 'page_arguments', 'access_arguments', and 'theme_arguments' will
* be filled in based on the database values and the objects loaded.
*/
function
menu_get_item
(
$path
=
NULL
,
$router_item
=
NULL
)
{
$router_items
=
&
drupal_static
(
__FUNCTION__
);
...
...
@@ -718,7 +719,7 @@ function _menu_item_localize(&$item, $map, $link_translate = FALSE) {
* $item['load_functions']. $item['access'] becomes TRUE if the item is
* accessible, FALSE otherwise. $item['href'] is set according to the map.
* If an error occurs during calling the load_functions (like trying to load
* a non
exist
ing
node) then this function return FALSE.
* a non
-
exist
ent
node) then this function return
s
FALSE.
*/
function
_menu_translate
(
&
$router_item
,
$map
,
$to_arg
=
FALSE
)
{
if
(
$to_arg
&&
!
empty
(
$router_item
[
'to_arg_functions'
]))
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment