You are here

function crumbs_get_router_item in Crumbs, the Breadcrumbs suite 6.2

Same name and namespace in other branches
  1. 7.2 crumbs.module \crumbs_get_router_item()
  2. 7 crumbs.module \crumbs_get_router_item()

Very similar to menu_get_item(), but with some little extra info stored in the result array.

3 calls to crumbs_get_router_item()
crumbs_debug_page in ./crumbs.debug.inc
crumbs_reduce_path in ./crumbs.trail.inc
Chop off path fragments until we find a valid path.
_crumbs_TrailFinder::buildTrail in ./crumbs.trail.inc
Build the raw trail, with no respect to title, access check, or skip-in-breadcrumb.

File

./crumbs.trail.inc, line 39

Code

function crumbs_get_router_item($path) {
  $normalpath = drupal_get_normal_path($path);
  $item = menu_get_item($normalpath);

  // 'route' is a less ambiguous name for a router path than 'path'.
  $item['route'] = $item['path'];

  // 'href' sounds more like it had already run through url().
  $item['link_path'] = $normalpath;
  $item['alias'] = drupal_get_path_alias($normalpath);
  $item['fragments'] = explode('/', $normalpath);
  return $item;
}