コード例 #1
0
 /**
  * @return string
  * @permissions right5
  */
 protected function actionSaveModuleAspect()
 {
     $arrParams = array();
     foreach ($this->getAllParams() as $strName => $intValue) {
         if (uniStrpos($strName, "aspect_") !== false) {
             $arrParams[] = uniSubstr($strName, 7);
         }
     }
     $objModule = class_module_system_module::getModuleBySystemid($this->getSystemid());
     $objModule->setStrAspect(implode(",", $arrParams));
     $objModule->updateObjectToDb();
     $this->adminReload(class_link::getLinkAdminHref($this->getArrModule("modul"), "list", "peClose=1&blockAction=1"));
 }
コード例 #2
0
 /**
  * The v4 way of generating a backend-navigation.
  *
  * @param string $strCurrentModule
  *
  * @return string
  */
 public function getAdminSitemap($strCurrentModule = "")
 {
     $strWrapperID = $this->objTemplate->readTemplate("/elements.tpl", "sitemap_wrapper");
     $strModuleID = $this->objTemplate->readTemplate("/elements.tpl", "sitemap_module_wrapper");
     $strModuleActiveID = $this->objTemplate->readTemplate("/elements.tpl", "sitemap_module_wrapper_active");
     $strActionID = $this->objTemplate->readTemplate("/elements.tpl", "sitemap_action_entry");
     $strDividerID = $this->objTemplate->readTemplate("/elements.tpl", "sitemap_divider_entry");
     $strModules = "";
     if ($strCurrentModule == "elemente") {
         $strCurrentModule = "pages";
     }
     $arrModules = class_module_system_module::getModulesInNaviAsArray(class_module_system_aspect::getCurrentAspectId());
     /** @var $arrNaviInstances class_module_system_module[] */
     $arrNaviInstances = array();
     foreach ($arrModules as $arrModule) {
         $objModule = class_module_system_module::getModuleBySystemid($arrModule["module_id"]);
         if ($objModule->rightView()) {
             $arrNaviInstances[] = $objModule;
         }
     }
     foreach ($arrNaviInstances as $objOneInstance) {
         $arrActions = class_admin_helper::getModuleActionNaviHelper($objOneInstance);
         $strActions = "";
         foreach ($arrActions as $strOneAction) {
             if (trim($strOneAction) != "") {
                 $arrActionEntries = array("action" => $strOneAction);
                 $strActions .= $this->objTemplate->fillTemplate($arrActionEntries, $strActionID);
             } else {
                 $strActions .= $this->objTemplate->fillTemplate(array(), $strDividerID);
             }
         }
         $arrModuleLevel = array("module" => class_link::getLinkAdmin($objOneInstance->getStrName(), "", "", class_carrier::getInstance()->getObjLang()->getLang("modul_titel", $objOneInstance->getStrName())), "actions" => $strActions, "systemid" => $objOneInstance->getSystemid(), "moduleTitle" => $objOneInstance->getStrName(), "moduleName" => class_carrier::getInstance()->getObjLang()->getLang("modul_titel", $objOneInstance->getStrName()), "moduleHref" => class_link::getLinkAdminHref($objOneInstance->getStrName(), ""));
         if ($strCurrentModule == $objOneInstance->getStrName()) {
             $strModules .= $this->objTemplate->fillTemplate($arrModuleLevel, $strModuleActiveID);
         } else {
             $strModules .= $this->objTemplate->fillTemplate($arrModuleLevel, $strModuleID);
         }
     }
     return $this->objTemplate->fillTemplate(array("level" => $strModules), $strWrapperID);
 }