BreadcrumbBuilder.php in Crumbs, the Breadcrumbs suite 7.2
File
lib/BreadcrumbBuilder.php
View source
<?php
class crumbs_BreadcrumbBuilder {
protected $pluginEngine;
function __construct($pluginEngine) {
$this->pluginEngine = $pluginEngine;
}
function buildBreadcrumb($trail) {
$breadcrumb = array();
foreach ($trail as $path => $item) {
if ($item) {
$title = $this->pluginEngine
->findTitle($path, $item, $breadcrumb);
if (!isset($title)) {
$title = $item['title'];
}
if (isset($title) && $title !== FALSE && $title !== '') {
$item['title'] = $title;
$breadcrumb[] = $item;
}
}
}
return $breadcrumb;
}
}