API for the Backdrop menu system.

File

core/includes/menu.inc

Functions

Namesort ascending Description
_menu_update_parental_status Checks and updates the 'has_children' status for the parent of a link.
_menu_tree_data Builds the data representing a menu tree.
_menu_tree_check_access Sorts the menu tree and recursively checks access for each item.
_menu_translate Handles dynamic path translation and menu access control.
_menu_site_status Checks whether the site is in maintenance mode.
_menu_set_expanded_menus Updates a list of menus with expanded items.
_menu_router_save Saves data from menu_router_build() to the router table.
_menu_router_cache Stores the menu router if we have it in memory.
_menu_router_build Builds the router table based on the data from hook_menu().
_menu_navigation_links_rebuild Builds menu links for the items in the menu router.
_menu_load_objects Loads objects into the map as defined in the $item['load_functions'].
_menu_link_translate Provides menu link access control, translation, and argument handling.
_menu_link_parents_set Sets the p1 through p9 values for a menu link being saved.
_menu_link_move_children Updates the children of a menu link that is being moved.
_menu_link_map_translate Translates the path elements in the map using any to_arg helper function.
_menu_link_find_parent Finds a possible parent for a given menu link.
_menu_link_build Builds a link from a router item.
_menu_item_localize Localizes the router item title using t() or another callback.
_menu_find_router_path Finds the router path which will serve this path.
_menu_delete_item Deletes a single menu link.
_menu_clear_page_cache Clears the page and block caches at most twice per page load.
_menu_check_access Checks access to a menu item using the access callback.
_menu_build_tree Builds a menu tree.
theme_menu_tree Returns HTML for a wrapper for a menu tree.
theme_menu_toggle Returns rendered HTML for a menu toggle.
theme_menu_local_tasks Returns HTML for primary and secondary local tasks.
theme_menu_local_task Returns HTML for a single local task link.
theme_menu_local_actions Returns rendered HTML for the local actions.
theme_menu_local_action Returns HTML for a single local action link.
theme_menu_link Returns HTML for a menu link and submenu.
template_preprocess_menu_tree Implements template_preprocess_HOOK() for theme_menu_tree().
menu_unserialize Unserializes menu data, using a map to replace path elements.
menu_tree_set_path Sets the path for determining the active trail of the specified menu tree.
menu_tree_page_data Gets the data structure for a named menu tree, based on the current page.
menu_tree_output Returns an output structure for rendering a menu tree.
menu_tree_get_path Gets the path for determining the active trail of the specified menu tree.
menu_tree_data Sorts and returns the built data representing a menu tree.
menu_tree_collect_node_links Collects node links from a given menu tree recursively.
menu_tree_check_access Checks access and performs dynamic operations for each link in the tree.
menu_tree_all_data Gets the data structure representing a named menu tree.
menu_tree Renders a menu tree based on the current path.
menu_tail_to_arg Returns a string containing the path relative to the current index.
menu_tail_load Loads the path as one string relative to the current index.
menu_tab_root_path Returns the router path, or the path for a default local task's parent.
menu_set_item Replaces the statically cached item for a given path.
menu_set_custom_theme Sets a custom theme for the current page, if there is one.
menu_set_active_trail Sets the active trail (path to the menu tree root) of the current page.
menu_set_active_menu_names Sets (or gets) the active menu for the current page.
menu_set_active_item Sets the active path, which determines which page is loaded.
menu_secondary_local_tasks Returns the rendered local tasks at the second level.
menu_router_build Collects and alters the menu definitions.
menu_reset_static_cache Resets the menu system static cache.
menu_rebuild Populates the database tables used by various menu functions.
menu_primary_local_tasks Returns the rendered local tasks at the top level.
menu_navigation_links Returns an array of links for a navigation menu.
menu_local_tasks Collects the local tasks (tabs), action links, and the root path.
menu_local_tabs Returns rendered HTML for the primary and secondary tabs.
menu_local_actions Returns the rendered local actions at the current level.
menu_load_links Returns an array containing all links for a menu.
menu_list_system_menus Returns an array containing the names of system-defined (default) menus.
menu_link_save Saves a menu link.
menu_link_maintain Inserts, updates, or deletes an un-customized menu link related to a module.
menu_link_load Gets a translated menu link that is ready for rendering.
menu_link_get_preferred Looks up the preferred menu link for a given system path.
menu_link_delete Delete one or several menu links.
menu_link_children_relative_depth Finds the depth of an item's children relative to its depth.
menu_links_clone Clones an array of menu links.
menu_get_router Gets the menu router.
menu_get_object Gets a loaded object from a router item.
menu_get_item Gets a router item.
menu_get_custom_theme Gets the custom theme for the current page, if there is one.
menu_get_ancestors Returns the ancestors (and relevant placeholders) for any given path.
menu_get_active_trail Gets the active trail (path to root menu root) of the current page.
menu_get_active_title Gets the title of the current page, as determined by the active trail.
menu_get_active_menu_names Gets the active menu for the current page.
menu_get_active_breadcrumb Gets the breadcrumb for the current page, as determined by the active trail.
menu_execute_active_handler Execute the page callback associated with the current path.
menu_delete_links Deletes all links for a menu.
menu_default_route_handler Executes the current router item's page callback.
menu_contextual_links Retrieves contextual links for a path based on registered local tasks.
menu_cache_clear_all Clears all cached menu data.
menu_cache_clear Clears the cached data for a single named menu.
menu_build_tree Builds a menu tree, translates links, and checks access.

Constants

Namesort ascending Description
MENU_VISIBLE_IN_TREE Internal menu flag -- menu item is visible in the menu tree.
MENU_VISIBLE_IN_BREADCRUMB Internal menu flag -- menu item is visible in the breadcrumb.
MENU_SUGGESTED_ITEM Menu type -- A normal menu item, hidden until enabled by an administrator.
MENU_SITE_ONLINE Internal menu status code -- Everything is working fine.
MENU_SITE_OFFLINE Internal menu status code -- Menu item inaccessible because site is offline.
MENU_PREFERRED_LINK Reserved key to identify the most specific menu link for a given path.
MENU_NOT_FOUND Menu status code -- Not found.
MENU_NORMAL_ITEM Menu type -- A "normal" menu item that's shown in menu and breadcrumbs.
MENU_MODIFIED_BY_ADMIN Internal menu flag -- menu item can be modified by administrator.
MENU_MAX_PARTS The maximum number of path elements for a menu callback
MENU_MAX_DEPTH The maximum depth of a menu links tree - matches the number of p columns.
MENU_LOCAL_TASK Menu type -- A task specific to the parent item, usually rendered as a tab.
MENU_LOCAL_ACTION Menu type -- An action specific to the parent, usually rendered as a link.
MENU_LINKS_TO_PARENT Internal menu flag -- menu item links back to its parent.
MENU_IS_ROOT Internal menu flag -- menu item is the root of the menu tree.
MENU_IS_LOCAL_TASK Internal menu flag -- menu item is a local task.
MENU_IS_LOCAL_ACTION Internal menu flag -- menu item is a local action.
MENU_DEFAULT_LOCAL_TASK Menu type -- The "default" local task, which is initially active.
MENU_CREATED_BY_ADMIN Internal menu flag -- menu item was created by administrator.
MENU_CONTEXT_PAGE Internal menu flag: Local task should be displayed in page context.
MENU_CONTEXT_NONE Internal menu flag: Invisible local task.
MENU_CONTEXT_INLINE Internal menu flag: Local task should be displayed inline.
MENU_CALLBACK Menu type -- A hidden, internal callback, typically used for API calls.
MENU_ACCESS_DENIED Menu status code -- Access denied.