Пример #1
0
 function __construct(NavigationItem $item)
 {
     $this->item = $item;
     $this->navigation = $this->item->GetNavigation();
     $this->tree = new NavigationTreeProvider($this->item->GetNavigation());
     $this->child = $this->tree->FirstChildOf($this->item);
 }
Пример #2
0
 protected function ItemClasses()
 {
     $classes = array();
     $classes[] = 'level-' . $this->level;
     if ($this->naviItem->Equals($this->naviTree->FirstChildOf($this->naviParent))) {
         $classes[] = 'first-item';
     }
     if ($this->naviTree->NextOf($this->naviItem) == null) {
         $classes[] = 'last-item';
     }
     if ($this->IsActive()) {
         $classes[] = 'active';
     } else {
         if ($this->IsTrail()) {
             $classes[] = 'trail';
         }
     }
     return join(' ', $classes);
 }