当前位置: 首页>>代码示例>>PHP>>正文


PHP class_module_system_module::getModulesInNaviAsArray方法代码示例

本文整理汇总了PHP中class_module_system_module::getModulesInNaviAsArray方法的典型用法代码示例。如果您正苦于以下问题:PHP class_module_system_module::getModulesInNaviAsArray方法的具体用法?PHP class_module_system_module::getModulesInNaviAsArray怎么用?PHP class_module_system_module::getModulesInNaviAsArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在class_module_system_module的用法示例。


在下文中一共展示了class_module_system_module::getModulesInNaviAsArray方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getAdminSitemap

 /**
  * 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);
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:47,代码来源:class_toolkit_admin.php

示例2: getUserForm

 /**
  * @param interface_usersources_user $objUser
  * @param bool $bitSelfedit
  * @param string $strMode
  *
  * @return class_admin_formgenerator|class_model
  */
 protected function getUserForm(interface_usersources_user $objUser, $bitSelfedit, $strMode)
 {
     //load a few default values
     //languages
     $arrLang = array();
     foreach ($this->arrLanguages as $strLanguage) {
         $arrLang[$strLanguage] = $this->getLang("lang_" . $strLanguage);
     }
     //skins
     $arrSkinsTemp = class_adminskin_helper::getListOfAdminskinsAvailable();
     $arrSkins = array();
     foreach ($arrSkinsTemp as $strSkin) {
         $arrSkins[$strSkin] = $strSkin;
     }
     //possible start-modules
     $arrModules = array();
     foreach (class_module_system_module::getModulesInNaviAsArray() as $arrOneModule) {
         $objOneModule = class_module_system_module::getModuleByName($arrOneModule["module_name"]);
         if (!$objOneModule->rightView()) {
             continue;
         }
         $arrModules[$objOneModule->getStrName()] = $objOneModule->getAdminInstanceOfConcreteModule()->getLang("modul_titel");
     }
     $objForm = new class_admin_formgenerator("user", $objUser);
     $objForm->addField(new class_formentry_headline())->setStrValue($this->getLang("user_personaldata"));
     //globals
     $objName = $objForm->addField(new class_formentry_text("user", "username"))->setBitMandatory(true)->setStrLabel($this->getLang("user_username"))->setStrValue($this->getParam("user_username"));
     if ($bitSelfedit) {
         $objName->setBitReadonly(true);
     }
     //generic
     //adding elements is more generic right here - load all methods
     if ($objUser->isEditable()) {
         $objAnnotations = new class_reflection($objUser);
         $arrProperties = $objAnnotations->getPropertiesWithAnnotation("@fieldType");
         foreach ($arrProperties as $strProperty => $strValue) {
             $objField = $objForm->addDynamicField($strProperty);
             if ($objField->getStrEntryName() == "user_pass" && $strMode == "new") {
                 $objField->setBitMandatory(true);
             }
         }
     }
     //system-settings
     $objForm->addField(new class_formentry_headline())->setStrValue($this->getLang("user_system"));
     $strInheritPermissionsId = $this->getParam("user_inherit_permissions_id");
     if (!empty($strInheritPermissionsId)) {
         $objForm->addField(new class_formentry_hidden("user", "inherit_permissions_id"))->setStrValue($strInheritPermissionsId);
         $objInheritUser = new class_module_user_user($strInheritPermissionsId);
         $objForm->addField(new class_formentry_plaintext("inherit_hint"))->setStrValue($this->objToolkit->warningBox($this->getLang("user_copy_info", "", array($objInheritUser->getStrDisplayName())), "alert-info"));
         $objForm->setFieldToPosition("inherit_hint", 1);
     }
     $objForm->addField(new class_formentry_dropdown("user", "skin"))->setArrKeyValues($arrSkins)->setStrValue($this->getParam("user_skin") != "" ? $this->getParam("user_skin") : class_module_system_setting::getConfigValue("_admin_skin_default_"))->setStrLabel($this->getLang("user_skin"));
     $objForm->addField(new class_formentry_dropdown("user", "language"))->setArrKeyValues($arrLang)->setStrValue($this->getParam("user_language") != "" ? $this->getParam("user_language") : "")->setStrLabel($this->getLang("user_language"))->setBitMandatory(true);
     $objForm->addField(new class_formentry_dropdown("user", "startmodule"))->setArrKeyValues($arrModules)->setStrValue($this->getParam("user_startmodule") != "" ? $this->getParam("user_startmodule") : "dashboard")->setStrLabel($this->getLang("user_startmodule"));
     $objForm->addField(new class_formentry_dropdown("user", "items_per_page"))->setArrKeyValues(array(10 => 10, 15 => 15, 25 => 25, 50 => 50))->setStrValue($this->getParam("user_items_per_page") != "" ? $this->getParam("user_items_per_page") : null)->setStrLabel($this->getLang("user_items_per_page"));
     if (!$bitSelfedit) {
         $objForm->addField(new class_formentry_checkbox("user", "adminlogin"))->setStrLabel($this->getLang("user_admin"));
         $objForm->addField(new class_formentry_checkbox("user", "portal"))->setStrLabel($this->getLang("user_portal"));
         $objForm->addField(new class_formentry_checkbox("user", "active"))->setStrLabel($this->getLang("user_aktiv"));
     }
     if (count($objUser->getGroupIdsForUser()) == 0 && empty($strInheritPermissionsId)) {
         $objForm->addField(new class_formentry_plaintext("group_hint"))->setStrValue($this->objToolkit->warningBox($this->getLang("form_user_hint_groups")));
         $objForm->setFieldToPosition("group_hint", 1);
     }
     $objForm->addField(new class_formentry_hidden("", "mode"))->setStrValue($strMode);
     $objUser->updateAdminForm($objForm);
     return $objForm;
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:75,代码来源:class_module_user_admin.php

示例3: flushActionNavigationCache

 /**
  * Static helper to flush the complete backend navigation cache for the current session
  * May be used during language-changes or user-switches
  *
  * @return void
  */
 public static function flushActionNavigationCache()
 {
     $arrAspects = class_module_system_aspect::getObjectList();
     foreach (class_module_system_module::getModulesInNaviAsArray() as $arrOneModule) {
         $objOneModule = class_module_system_module::getModuleByName($arrOneModule["module_name"]);
         foreach ($arrAspects as $objOneAspect) {
             class_carrier::getInstance()->getObjSession()->sessionUnset(__CLASS__ . "adminNaviEntries" . $objOneModule->getSystemid() . $objOneAspect->getSystemid());
         }
     }
 }
开发者ID:jinshana,项目名称:kajonacms,代码行数:16,代码来源:class_admin_helper.php


注:本文中的class_module_system_module::getModulesInNaviAsArray方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。