menu.inc
Version
1.146.2.1 (checked in on 2007/06/17 at 01:50:50 by drumm)
Description
API for the Drupal menu system.
Constants
| Name | Description |
|---|---|
| MENU_ACCESS_DENIED | |
| MENU_CALLBACK | Callbacks simply register a path so that the correct function is fired when the URL is accessed. They are not shown in the menu. |
| MENU_CREATED_BY_ADMIN | |
| MENU_CUSTOM_ITEM | Custom items are those defined by the administrator. Reserved for internal use; do not return from hook_menu() implementations. |
| MENU_CUSTOM_MENU | Custom menus are those defined by the administrator. Reserved for internal use; do not return from hook_menu() implementations. |
| MENU_DEFAULT_LOCAL_TASK | Every set of local tasks should provide one "default" task, that links to the same path as its parent when clicked. |
| MENU_DYNAMIC_ITEM | Dynamic menu items change frequently, and so should not be stored in the database for administrative customization. |
| MENU_EXPANDED | |
| MENU_FOUND | |
| MENU_IS_LOCAL_TASK | |
| MENU_IS_ROOT | |
| MENU_ITEM_GROUPING | Item groupings are used for pages like "node/add" that simply list subpages to visit. They are distinguished from other pages in that they will disappear from the menu if no subpages exist. |
| MENU_LINKS_TO_PARENT | |
| MENU_LOCAL_TASK | Local tasks are rendered as tabs by default. Use this for menu items that describe actions to be performed on their parent item. An example is the path "node/52/edit", which performs the "edit" task on "node/52". |
| MENU_MODIFIABLE_BY_ADMIN | |
| MENU_MODIFIED_BY_ADMIN | |
| MENU_NORMAL_ITEM | Normal menu items show up in the menu tree and can be moved/hidden by the administrator. Use this for most menu items. It is the default value if no menu item type is specified. |
| MENU_NOT_FOUND | |
| MENU_SITE_OFFLINE | |
| MENU_SUGGESTED_ITEM | Modules may "suggest" menu items that the administrator may enable. They act just as callbacks do until enabled, at which time they act like normal items. |
| MENU_VISIBLE_IF_HAS_CHILDREN | |
| MENU_VISIBLE_IN_BREADCRUMB | |
| MENU_VISIBLE_IN_TREE |
Functions
| Name | Description |
|---|---|
| menu_execute_active_handler | Execute the handler associated with the active menu item. |
| menu_get_active_breadcrumb | Returns an array of rendered menu items in the active breadcrumb trail. |
| menu_get_active_help | Returns the help associated with the active menu item. |
| menu_get_active_item | Returns the ID of the active menu item. |
| menu_get_active_nontask_item | Returns the ID of the current menu item or, if the current item is a local task, the menu item to which this task is attached. |
| menu_get_active_title | Returns the title of the active menu item. |
| menu_get_item | Retrieves the menu item specified by $mid, or by $path if $mid is not given. |
| menu_get_local_tasks | Return the local task tree. |
| menu_get_menu | Return the menu data structure. |
| menu_get_root_menus | Retrieves the menu ID and title of all root menus. |
| menu_in_active_trail | Returns TRUE when the menu item is in the active trail. |
| menu_in_active_trail_in_submenu | Returns TRUE when the menu item is in the active trail within a specific subsection of the menu tree. |
| menu_item_link | Returns the rendered link to a menu item. |
| menu_primary_links | Returns an array containing the primary links. Can optionally descend from the root of the Primary links menu towards the current node for a specified number of levels and return that submenu. Used to generate a primary/secondary menu from different... |
| menu_primary_local_tasks | Returns the rendered HTML of the primary local tasks. |
| menu_rebuild | Populate the database representation of the menu. |
| menu_secondary_links | Returns an array containing the secondary links. Secondary links can be either a second level of the Primary links menu or generated from their own menu. |
| menu_secondary_local_tasks | Returns the rendered HTML of the secondary local tasks. |
| menu_set_active_item | Sets the path of the active menu item. |
| menu_set_location | Change the current menu location of the user. |
| menu_tree | Returns a rendered menu tree. |
| theme_menu_item | Generate the HTML output for a single menu item. |
| theme_menu_item_link | Generate the HTML representing a given menu item ID. |
| theme_menu_links | Returns the themed HTML for primary and secondary links. Note that this function is overridden by most core themes because those themes display links in "link | link" format, not from a list. Also note that by default links rendered with... |
| theme_menu_local_task | Generate the HTML representing a given menu item ID as a tab. |
| theme_menu_local_tasks | Returns the rendered local tasks. The default implementation renders them as tabs. |
| theme_menu_tree | Generate the HTML for a menu tree. |
| _menu_append_contextual_items | Account for menu items that are only defined at certain paths, so will not be cached. |
| _menu_build | Build the menu by querying both modules and the database. |
| _menu_build_local_tasks | Find all the items in the current local task tree. |
| _menu_build_visible_tree | Find all visible items in the menu tree, for ease in displaying to user. |
| _menu_find_parents | Establish parent-child relationships. |
| _menu_get_active_trail | Returns an array with the menu items that lead to the current menu item. |
| _menu_get_active_trail_in_submenu | Find the active trail through a specific subsection of the menu tree. |
| _menu_item_is_accessible | Determine whether the given menu item is accessible to the current user. |
| _menu_site_is_offline | Returns TRUE if the site is off-line for maintenance. |
| _menu_sort | Comparator routine for use in sorting menu items. |
