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


PHP VardefManager::getLinkedModulesFromFormula方法代码示例

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


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

示例1: action_saveSugarField

 public function action_saveSugarField()
 {
     global $mod_strings;
     $field = get_widget($_REQUEST['type']);
     $_REQUEST['name'] = trim($_POST['name']);
     $field->populateFromPost();
     $module = $_REQUEST['view_module'];
     $df = new StandardField($module);
     $mod = BeanFactory::getBean($module);
     $obj = BeanFactory::getObjectName($module);
     $df->setup($mod);
     $field->module = $mod;
     $field->save($df);
     $this->action_SaveLabel();
     $MBmodStrings = $mod_strings;
     $GLOBALS['mod_strings'] = return_module_language('', 'Administration');
     include_once 'modules/Administration/QuickRepairAndRebuild.php';
     $GLOBALS['mod_strings']['LBL_ALL_MODULES'] = 'all_modules';
     $_REQUEST['execute_sql'] = true;
     $mi = new ModuleInstaller();
     $mi->silent = true;
     $mi->rebuild_extensions();
     $repair = new RepairAndClear();
     $repair->repairAndClearAll(array('clearVardefs', 'clearTpls', 'clearSearchCache'), array($module), true, false);
     //#28707 ,clear all the js files in cache
     $repair->module_list = array();
     $repair->clearJsFiles();
     //Ensure the vardefs are up to date for this module before we rebuild the cache now.
     VardefManager::loadVardef($module, $obj, true);
     //Make sure to clear the vardef for related modules as well
     $relatedMods = array();
     if (!empty($field->dependency)) {
         $relatedMods = array_merge($relatedMods, VardefManager::getLinkedModulesFromFormula($mod, $field->dependency));
     }
     if (!empty($field->formula)) {
         $relatedMods = array_merge($relatedMods, VardefManager::getLinkedModulesFromFormula($mod, $field->formula));
     }
     foreach ($relatedMods as $mName => $oName) {
         $repair->repairAndClearAll(array('clearVardefs', 'clearTpls'), array($mName), true, false);
         VardefManager::clearVardef($mName, $oName);
     }
     // now clear the cache so that the results are immediately visible
     TemplateHandler::clearCache($module);
     if ($module == 'Users') {
         TemplateHandler::clearCache('Employees');
     }
     // Bug 59210
     // Clear the metadata cache so this change can be reflected
     // immediately.
     $repair->module_list = array($module);
     // Sending false will only rebuild the $module section of the cache
     $repair->repairMetadataAPICache(false);
     $GLOBALS['mod_strings'] = $MBmodStrings;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:54,代码来源:controller.php


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