Example #1
0
 /**
  * Display item
  *
  * @param Item $item
  * @param int $level
  * @return void
  */
 protected function displayItem(Item $item, $level = 0)
 {
     $colorStyle = isset($this->used[$item->getHash()]) ? '' : ' style="color:red" ';
     echo "<tr><td {$colorStyle}>" . str_repeat('ยท&nbsp;', $level) . $item->getClass() . ' - ' . $item->getHash() . '</td></tr>';
     foreach ($item->getChildren() as $child) {
         $this->displayItem($child, $level + 1);
     }
 }