You are here

function crumbs_Admin_DebugTable::setTrail in Crumbs, the Breadcrumbs suite 7.2

Parameters

array[] $trail: Format: $[$path] = $trailItem

array[] $breadcrumbItems: Format: $[] = $breadcrumbItem

File

lib/Admin/DebugTable.php, line 47

Class

crumbs_Admin_DebugTable

Code

function setTrail($trail, $breadcrumbItems) {
  $this->trail = $trail;
  $this->paths = array_reverse(array_keys($this->trail));
  $titles = $this
    ->getTitles($trail, $breadcrumbItems);
  foreach ($this->paths as $i => $path) {
    $title = isset($titles[$path]) ? $titles[$path] : NULL;
    $this
      ->addTrailItemColumns($i, $path, $i + 1 >= count($trail), $title);
    $route_code = '<code>' . $trail[$path]['route'] . '</code>';
    $this->table
      ->td('route', "item.{$i}", $route_code);
  }
}