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


PHP ModuleInstaller::rebuild_extensions方法代码示例

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


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

示例1: rebuildLanguageExtensions

 /**
  * Rebuilds extensions and language files for this language and module
  * 
  * @param string $language The language to rebuild extensions for
  * @param string $moduleName The name of the module whose extensions are being rebuilt
  */
 protected static function rebuildLanguageExtensions($language, $moduleName)
 {
     if (empty(self::$moduleInstaller)) {
         self::$moduleInstaller = new ModuleInstaller();
         self::$moduleInstaller->silent = true;
     }
     self::$moduleInstaller->rebuild_extensions(array($moduleName), array('languages'));
     // While this *is* called from rebuild_extensions, it doesn't do anything
     // there because there is no language or module provided to it. This fixes
     // that.
     self::$moduleInstaller->rebuild_languages(array($language => $language), array($moduleName));
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:18,代码来源:parser.label.php

示例2: trim

 function action_saveSugarField()
 {
     global $mod_strings;
     require_once 'modules/DynamicFields/FieldCases.php';
     $field = get_widget($_REQUEST['type']);
     $_REQUEST['name'] = trim($_POST['name']);
     $field->populateFromPost();
     require_once 'modules/ModuleBuilder/parsers/StandardField.php';
     $module = $_REQUEST['view_module'];
     // Need to map Employees -> Users
     if ($module == 'Employees') {
         $module = 'Users';
     }
     $df = new StandardField($module);
     $mod = BeanFactory::getBean($module);
     $class_name = $GLOBALS['beanList'][$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;
     require_once 'ModuleInstall/ModuleInstaller.php';
     $mi = new ModuleInstaller();
     $mi->silent = true;
     $mi->rebuild_extensions();
     $repair = new RepairAndClear();
     $repair->repairAndClearAll(array('clearVardefs', 'clearTpls'), array($class_name), true, false);
     //#28707 ,clear all the js files in cache
     $repair->module_list = array();
     $repair->clearJsFiles();
     // now clear the cache so that the results are immediately visible
     include_once 'include/TemplateHandler/TemplateHandler.php';
     TemplateHandler::clearCache($module);
     if ($module == 'Users') {
         TemplateHandler::clearCache('Employees');
     }
     $GLOBALS['mod_strings'] = $MBmodStrings;
 }
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:42,代码来源:controller.php

示例3: 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

示例4: installLog

            if ($bean == "SavedReport") {
                $new_report = 1;
            }
        }
        installLog("creating Relationship Meta for " . $focus->getObjectName());
        installerHook('pre_createModuleTable', array('module' => $focus->getObjectName()));
        SugarBean::createRelationshipMeta($focus->getObjectName(), $db, $table_name, $empty, $focus->module_dir);
        installerHook('post_createModuleTable', array('module' => $focus->getObjectName()));
        echo ".";
    }
    // end if()
}
installerHook('post_createAllModuleTables');
// re-add this back to re-generate everything here $mi is created above
$mi->silent = true;
$mi->rebuild_extensions();
echo "<br>";
////    END TABLE STUFF
///////////////////////////////////////////////////////////////////////////////
////    START RELATIONSHIP CREATION
ksort($rel_dictionary);
foreach ($rel_dictionary as $rel_name => $rel_data) {
    $table = $rel_data['table'];
    if ($setup_db_drop_tables) {
        if ($db->tableExists($table)) {
            $db->dropTableName($table);
        }
    }
    if (!$db->tableExists($table)) {
        $db->createTableParams($table, $rel_data['fields'], isset($rel_data['indices']) ? $rel_data['indices'] : array());
    }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:31,代码来源:performSetup.php


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