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


PHP VTCacheUtils::updateMap_ListofModuleInfos方法代码示例

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


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

示例1: json_decode

 * Vizsage Public License (the "License"). You may not use this file except in compliance with the
 * License. Roughly speaking, non-commercial users may share and modify this code, but must give credit
 * and share improvements. However, for proper details please read the full License, available at
 * http://vizsage.com/license/Vizsage-License-BY-NC-SA.html and the handy reference for understanding
 * the full license at http://vizsage.com/license/Vizsage-Deed-BY-NC-SA.html. Unless required by
 * applicable law or agreed to in writing, any software distributed under the License is distributed
 * on an  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and limitations under the
 * License terms of Creative Commons Attribution-NonCommercial-ShareAlike 3.0 (the License).
 *************************************************************************************************
 *  Module       : cbMap
 *  Version      : 5.5.0
 *  Author       : OpenCubed.
 *************************************************************************************************/
global $log;
include_once 'modules/cbMap/cbMap.php';
global $mod_strings, $app_strings;
$mapInstance = CRMEntity::getInstance("cbMap");
$modtype = $_REQUEST['modtype'];
$module_list = json_decode($_REQUEST['module_list']);
$related_modules = json_decode($_REQUEST['related_modules']);
$rel_fields = json_decode($_REQUEST['rel_fields']);
$pmodule = $_REQUEST['pmodule'];
VTCacheUtils::updateMap_ListofModuleInfos($module_list, $related_modules, $rel_fields);
if ($modtype == "target") {
    $mapInstance->getPriModuleFieldsList($pmodule, $modtype);
    echo $mapInstance->getPrimaryFieldHTML($pmodule, $modtype);
} else {
    $mapInstance->getPriModuleFieldsList($pmodule, $modtype);
    echo $mapInstance->getPrimaryFieldHTML($pmodule, $modtype);
}
开发者ID:kduqi,项目名称:corebos,代码行数:31,代码来源:getFields.php

示例2: initListOfModules

 function initListOfModules()
 {
     global $adb;
     $restricted_modules = array('Emails', 'Events', 'Webmails');
     $restricted_blocks = array('LBL_IMAGE_INFORMATION', 'LBL_COMMENTS', 'LBL_COMMENT_INFORMATION');
     //tabid and name of modules
     $this->module_id = array();
     //name and blocks of modules
     $this->module_list = array();
     $modulerows = vtlib_prefetchModuleActiveInfo(false);
     $cachedInfo = VTCacheUtils::lookupMap_ListofModuleInfos();
     if ($cachedInfo !== false) {
         $this->module_list = $cachedInfo['module_list'];
         $this->related_modules = $cachedInfo['related_modules'];
         $this->rel_fields = $cachedInfo['rel_fields'];
     } else {
         if ($modulerows) {
             foreach ($modulerows as $resultrow) {
                 if ($resultrow['presence'] == '1') {
                     continue;
                 }
                 // skip disabled modules
                 if ($resultrow['isentitytype'] != '1') {
                     continue;
                 }
                 // skip extension modules
                 if (in_array($resultrow['name'], $restricted_modules)) {
                     // skip restricted modules
                     continue;
                 }
                 if ($resultrow['name'] != 'Calendar') {
                     $this->module_id[$resultrow['tabid']] = $resultrow['name'];
                 } else {
                     $this->module_id[9] = $resultrow['name'];
                     $this->module_id[16] = $resultrow['name'];
                 }
                 $this->module_list[$resultrow['name']] = array();
             }
             //get tabId of all modules
             $moduleids = array_keys($this->module_id);
             $moduleblocks = $adb->pquery("SELECT blockid, blocklabel, tabid FROM vtiger_blocks WHERE tabid IN (" . generateQuestionMarks($moduleids) . ")", array($moduleids));
             $prev_block_label = '';
             if ($adb->num_rows($moduleblocks)) {
                 while ($resultrow = $adb->fetch_array($moduleblocks)) {
                     $blockid = $resultrow['blockid'];
                     $blocklabel = $resultrow['blocklabel'];
                     $module = $this->module_id[$resultrow['tabid']];
                     if (in_array($blocklabel, $restricted_blocks) || in_array($blockid, $this->module_list[$module]) || isset($this->module_list[$module][getTranslatedString($blocklabel, $module)])) {
                         continue;
                     }
                     if (!empty($blocklabel)) {
                         if ($module == 'Calendar' && $blocklabel == 'LBL_CUSTOM_INFORMATION') {
                             $this->module_list[$module][$blockid] = getTranslatedString($blocklabel, $module);
                         } else {
                             $this->module_list[$module][$blockid] = getTranslatedString($blocklabel, $module);
                         }
                         $prev_block_label = $blocklabel;
                     } else {
                         $this->module_list[$module][$blockid] = getTranslatedString($prev_block_label, $module);
                     }
                 }
             }
             //                $relatedmodules = $adb->pquery(
             //                        "SELECT vtiger_tab.name, vtiger_relatedlists.tabid FROM $dbname.vtiger_tab
             //                        INNER JOIN $dbname.vtiger_relatedlists on vtiger_tab.tabid=vtiger_relatedlists.related_tabid
             //                        WHERE vtiger_tab.isentitytype=1
             //                        AND vtiger_tab.name NOT IN(".generateQuestionMarks($restricted_modules).")
             //                        AND vtiger_tab.presence = 0 AND vtiger_relatedlists.label!='Activity History'
             //                        UNION
             //                        SELECT module, vtiger_tab.tabid FROM $dbname.vtiger_fieldmodulerel
             //                        INNER JOIN $dbname.vtiger_tab on vtiger_tab.name = vtiger_fieldmodulerel.relmodule
             //                        WHERE vtiger_tab.isentitytype = 1
             //                        AND vtiger_tab.name NOT IN(".generateQuestionMarks($restricted_modules).")
             //                        AND vtiger_tab.presence = 0",
             //                        array($restricted_modules,$restricted_modules)
             //                );
             $relatedmodules = $adb->pquery("SELECT module as name, vtiger_tab.tabid,fieldid FROM vtiger_fieldmodulerel\n                                INNER JOIN vtiger_tab on vtiger_tab.name = vtiger_fieldmodulerel.relmodule\n                                WHERE vtiger_tab.isentitytype = 1\n                                AND vtiger_tab.name NOT IN(" . generateQuestionMarks($restricted_modules) . ")\n                                AND vtiger_tab.presence = 0\n\t\t\t\tUNION\n\t\t\t        SELECT relmodule as name, vtiger_tab.tabid,fieldid FROM vtiger_fieldmodulerel\n                                INNER JOIN vtiger_tab on vtiger_tab.name = vtiger_fieldmodulerel.module\n                                WHERE vtiger_tab.isentitytype = 1\n                                AND vtiger_tab.name NOT IN(" . generateQuestionMarks($restricted_modules) . ")\n                                AND vtiger_tab.presence = 0", array($restricted_modules, $restricted_modules));
             if ($adb->num_rows($relatedmodules)) {
                 while ($resultrow = $adb->fetch_array($relatedmodules)) {
                     $module = $this->module_id[$resultrow['tabid']];
                     if (!isset($this->related_modules[$module])) {
                         $this->related_modules[$module] = array();
                     }
                     if (!isset($this->related_modules[$module])) {
                         $this->rel_fields[$module] = array();
                     }
                     if ($module != $resultrow['name']) {
                         $this->related_modules[$module][] = $resultrow['name'];
                         $this->rel_fields[$module][$resultrow['name']] = $this->getFieldName($resultrow['fieldid']);
                     }
                 }
             }
             // Put the information in cache for re-use
             VTCacheUtils::updateMap_ListofModuleInfos($this->module_list, $this->related_modules, $this->rel_fields);
         }
     }
 }
开发者ID:kduqi,项目名称:corebos,代码行数:97,代码来源:cbMap_processes.php


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