You are here

private function crumbs_Admin_DebugTable::addTrailItemColumns in Crumbs, the Breadcrumbs suite 7.2

Add columns and header cells for a given trail item.

Parameters

int $i:

string $path:

bool $is_last:

string|null $title:

1 call to crumbs_Admin_DebugTable::addTrailItemColumns()
crumbs_Admin_DebugTable::setTrail in lib/Admin/DebugTable.php

File

lib/Admin/DebugTable.php, line 88

Class

crumbs_Admin_DebugTable

Code

private function addTrailItemColumns($i, $path, $is_last, $title) {
  $separator = $i > 0 ? '«' : ':';
  $this->table
    ->addColName("separator.{$i}")
    ->td('', "separator.{$i}", $separator);
  if (!$is_last) {
    $this->table
      ->addColGroup("item.{$i}", array(
      'title',
      'parent',
    ));
    $path_eff = $path;
  }
  else {
    $this->table
      ->addColGroup("item.{$i}", array(
      'title',
    ));
    $path_eff = '<front>';
  }
  $path_code = '<code>' . check_plain($path_eff) . '</code>';

  # $path_link = l($path_code, $path_eff, array('html' => TRUE));
  $this->table
    ->td('path', "item.{$i}", $path_code);
  if (isset($title)) {
    $this->table
      ->td('link', "item.{$i}", l($title, $path_eff));
  }
  else {

    // No title - the breadcrumb item will be skipped.
    $this->table
      ->td('link', "item.{$i}", 'no title, skipped');
  }
}