You are here

function crumbs_get_router_item in Crumbs, the Breadcrumbs suite 7.2

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

Returns a router item.

This is a wrapper around menu_get_item() that sets additional keys (route, link_path, alias, fragments).

Parameters

$path: The path for which the corresponding router item is returned. For example, node/5.

Return value

array The router item.

1 call to crumbs_get_router_item()
MenuLinkPluginTest::testMenuLinkTitle in lib/Drupal/crumbs/Tests/MenuLinkPluginTest.php

File

./crumbs.module, line 130
Provides an API for building breadcrumbs.

Code

function crumbs_get_router_item($path) {
  return crumbs()->router
    ->getRouterItem($path);
}