/** * Returns a list of the current level * * @return string * @autoTestable * @permissions view */ protected function actionList() { $strReturn = ""; //Decide, whether to return the list of navigation or the layer of a navigation if ($this->getSystemid() == "" || $this->getSystemid() == $this->getObjModule()->getSystemid()) { $objIterator = new class_array_section_iterator(class_module_navigation_tree::getObjectCount(class_module_system_module::getModuleIdByNr(_navigation_modul_id_))); $objIterator->setPageNumber($this->getParam("pv")); $objIterator->setArraySection(class_module_navigation_tree::getObjectList("", $objIterator->calculateStartPos(), $objIterator->calculateEndPos())); return $this->renderList($objIterator); } else { $objIterator = new class_array_section_iterator(class_module_navigation_point::getObjectCount($this->getSystemid())); $objIterator->setPageNumber($this->getParam("pv")); $objIterator->setArraySection(class_module_navigation_point::getNaviLayer($this->getSystemid(), false, $objIterator->calculateStartPos(), $objIterator->calculateEndPos())); $strReturn .= $this->renderList($objIterator, true, "naviPoints", true); if ($this->strPeAddon == "") { $strReturn = $this->generateTreeView($strReturn); } return $strReturn; } }
/** * Looks up a navigation by its name * * @param string $strName * * @return class_module_navigation_tree * @static */ public static function getNavigationByName($strName) { $objOrm = new class_orm_objectlist(); $objOrm->addWhereRestriction(new class_orm_objectlist_property_restriction("strName", class_orm_comparator_enum::Equal(), $strName)); $arrRows = $objOrm->getObjectList("class_module_navigation_tree", class_module_system_module::getModuleIdByNr(_navigation_modul_id_)); if (count($arrRows) == 1) { return $arrRows[0]; } return null; }