/** * Submenu for sport * @param int $sportid * @param int $year * @return string */ private static function submenuForSport($sportid, $year) { $Code = '<li' . (-1 == $sportid ? ' class="active"' : '') . '>' . self::linkToRoutenet(__('All'), -1, $year) . '</li>'; $Sports = SportFactory::NamesAsArray(); foreach ($Sports as $id => $name) { $Code .= '<li' . ($id == $sportid ? ' class="active"' : '') . '>' . self::linkToRoutenet($name, $id, $year) . '</li>'; } return $Code; }
/** * Get menu links for sports * @return array */ private function getMenuLinksForSports() { $Links = array($this->link(__('All sports'), $this->Year, 0, 'sport', Request::param('group') == 'sport')); $SportGroup = Request::param('group') == 'sport' ? 'types' : Request::param('group'); $Sports = SportFactory::NamesAsArray(); foreach ($Sports as $id => $name) { $Links[] = $this->link($name, $this->Year, $id, $SportGroup, $this->Sport->id() == $id); } return $Links; }
/** * Get links for all sports * @return array */ private function getSportLinksAsList() { $Links = ''; if ($this->ShowAllSportsLink) { $Links .= '<li' . (-1 == $this->sportid ? ' class="active"' : '') . '>' . $this->getInnerLink(__('All'), -1, $this->year, $this->dat) . '</li>'; } $Sports = SportFactory::NamesAsArray(); foreach ($Sports as $id => $name) { $Links .= '<li' . ($id == $this->sportid ? ' class="active"' : '') . '>' . $this->getInnerLink($name, $id, $this->year, $this->dat) . '</li>'; } return $Links; }