function menu_get_item

×

Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
cis7 menu.inc menu_get_item($path = NULL, $router_item = NULL)
cle7 menu.inc menu_get_item($path = NULL, $router_item = NULL)
elmsmedia7 menu.inc menu_get_item($path = NULL, $router_item = NULL)
icor7 menu.inc menu_get_item($path = NULL, $router_item = NULL)
meedjum_blog7 menu.inc menu_get_item($path = NULL, $router_item = NULL)
mooc7 menu.inc menu_get_item($path = NULL, $router_item = NULL)

Gets a router item.

Parameters

$path: The path; for example, 'node/5'. The function will find the corresponding node/% item and return that.

$router_item: Internal use only.

Return value

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.

Related topics

66 calls to menu_get_item()
adaptivetheme_page_alter in sites/all/themes/ulmus/adaptivetheme/at_core/inc/alter.inc
hook_page_alter()
advagg_requirements in sites/all/modules/ulmus/advagg/advagg.install
Implements hook_requirements().
at_generate_html_classes in sites/all/themes/ulmus/adaptivetheme/at_core/inc/generate.inc
Return an array of classes to be used for body classes in html.tpl.php
block_page_build in modules/block/block.module
Implements hook_page_build().
blog_menu_local_tasks_alter in modules/blog/blog.module
Implements hook_menu_local_tasks_alter().

... See full list

1 string reference to 'menu_get_item'
httprl_is_background_callback_capable in sites/all/modules/ulmus/httprl/httprl.module
Sees if httprl can run a background callback.

File

includes/menu.inc, line 447
API for the Drupal menu system.

Code

function menu_get_item($path = NULL, $router_item = NULL) {
  $router_items = &drupal_static(__FUNCTION__);
  if (!isset($path)) {
    $path = $_GET['q'];
  }
  if (isset($router_item)) {
    $router_items[$path] = $router_item;
  }
  if (!isset($router_items[$path])) {
    // Rebuild if we know it's needed, or if the menu masks are missing which
    // occurs rarely, likely due to a race condition of multiple rebuilds.
    if (variable_get('menu_rebuild_needed', FALSE) || !variable_get('menu_masks', array())) {
      menu_rebuild();
    }
    $original_map = arg(NULL, $path);

    $parts = array_slice($original_map, 0, MENU_MAX_PARTS);
    $ancestors = menu_get_ancestors($parts);
    $router_item = db_query_range('SELECT * FROM {menu_router} WHERE path IN (:ancestors) ORDER BY fit DESC', 0, 1, array(':ancestors' => $ancestors))->fetchAssoc();

    if ($router_item) {
      // Allow modules to alter the router item before it is translated and
      // checked for access.
      drupal_alter('menu_get_item', $router_item, $path, $original_map);

      $map = _menu_translate($router_item, $original_map);
      $router_item['original_map'] = $original_map;
      if ($map === FALSE) {
        $router_items[$path] = FALSE;
        return FALSE;
      }
      if ($router_item['access']) {
        $router_item['map'] = $map;
        $router_item['page_arguments'] = array_merge(menu_unserialize($router_item['page_arguments'], $map), array_slice($map, $router_item['number_parts']));
        $router_item['theme_arguments'] = array_merge(menu_unserialize($router_item['theme_arguments'], $map), array_slice($map, $router_item['number_parts']));
      }
    }
    $router_items[$path] = $router_item;
  }
  return $router_items[$path];
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.