Ejemplo n.º 1
0
 /**
  * Get the HTML of the breadcrumbs itself
  * @return string
  */
 private function getBreadcrumbsHtml()
 {
     $html = '';
     $index = 1;
     $numBreadcrumbs = count($this->breadcrumbs);
     foreach ($this->breadcrumbs as $label => $url) {
         $anchor = new Anchor($label, $url);
         if ($index == 1) {
             $anchor->appendToClass(self::STYLE_CLASS_FIRST);
         }
         if ($index == $numBreadcrumbs) {
             $anchor->appendToClass(self::STYLE_CLASS_LAST);
         }
         $html .= ($html ? $this->separator : '') . $anchor->getHtml();
         $index++;
     }
     return $html;
 }