コード例 #1
0
ファイル: WavePage.class.php プロジェクト: rolwi/koala
 public function getSubPages($showHidden)
 {
     $result = array();
     $subRooms = $this->object->get_inventory(CLASS_ROOM);
     foreach ($subRooms as $subRoom) {
         $result[] = WavePage::getInstanceFor($subRoom->get_Id(), $this->mySide);
     }
     return $result;
 }
コード例 #2
0
ファイル: WaveEngine.class.php プロジェクト: rolwi/koala
 public function getFullMenuAsHtml($array = null)
 {
     $currentPage = $this->getCurrentObject();
     if ($array === null) {
         return $this->getFullMenuAsHtml($this->getFullMenuAsArray());
     } else {
         if (empty($array)) {
             return "";
         } else {
             $html = "<ul>";
             foreach ($array as $pageId => $subPages) {
                 if ($pageId === $currentPage->get_id()) {
                     $current = " class=\"current\" ";
                 } else {
                     $current = "";
                 }
                 $page = WavePage::getInstanceFor($pageId, $this->getSide());
                 $html .= "<li{$current}><a href=\"{$page->getPageUrl()}\">{$page->getPageName()}</a>" . $this->getFullMenuAsHtml($subPages) . "</li>";
             }
             $html .= "</ul>";
             return $html;
         }
     }
 }