You are here

function crumbs_build_breadcrumb in Crumbs, the Breadcrumbs suite 7

Same name and namespace in other branches
  1. 6.2 crumbs.breadcrumb.inc \crumbs_build_breadcrumb()
  2. 6 crumbs.module \crumbs_build_breadcrumb()

Builds the breadcrumb based on the provided trail.

Each breadcrumb item is a router item taken from the trail, with two additional/updated keys:

  • title: The title of the breadcrumb item as received from a plugin.
  • localized_options: An array of options passed to l() if needed.

Parameters

$trail: The trail provided by crumbs_get_trail().

Return value

An array of breadcrumb items.

See also

crumbs_BreadcrumbBuilder

1 call to crumbs_build_breadcrumb()
crumbs_get_breadcrumb_data in ./crumbs.module
Returns the breadcrumb data for the current page.

File

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

Code

function crumbs_build_breadcrumb(array $trail) {
  $plugin_engine = crumbs_get_plugin_engine();
  $breadcrumb_builder = new crumbs_BreadcrumbBuilder($plugin_engine);
  return $breadcrumb_builder
    ->buildBreadcrumb($trail);
}