本文整理汇总了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;
}