本文整理汇总了PHP中ModuleInstaller::rebuild_tabledictionary方法的典型用法代码示例。如果您正苦于以下问题:PHP ModuleInstaller::rebuild_tabledictionary方法的具体用法?PHP ModuleInstaller::rebuild_tabledictionary怎么用?PHP ModuleInstaller::rebuild_tabledictionary使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModuleInstaller
的用法示例。
在下文中一共展示了ModuleInstaller::rebuild_tabledictionary方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createRelationship
private function createRelationship($lhs_module, $rhs_module = null, $relationship_type = 'one-to-many')
{
$rhs_module = $rhs_module == null ? $lhs_module : $rhs_module;
// Adding relation between products and users
$this->relationships = new DeployedRelationships($lhs_module);
$definition = array('lhs_module' => $lhs_module, 'relationship_type' => $relationship_type, 'rhs_module' => $rhs_module, 'lhs_label' => $lhs_module, 'rhs_label' => $rhs_module, 'rhs_subpanel' => 'default');
$this->relationship = RelationshipFactory::newRelationship($definition);
$this->relationships->add($this->relationship);
$this->relationships->save();
$this->relationships->build();
LanguageManager::clearLanguageCache($lhs_module);
// Updating $dictionary by created relation
global $dictionary;
$moduleInstaller = new ModuleInstaller();
$moduleInstaller->silent = true;
$moduleInstaller->rebuild_tabledictionary();
require 'modules/TableDictionary.php';
// Updating vardefs
VardefManager::$linkFields = array();
VardefManager::clearVardef();
VardefManager::refreshVardefs($lhs_module, BeanFactory::getObjectName($lhs_module));
if ($lhs_module != $rhs_module) {
VardefManager::refreshVardefs($rhs_module, BeanFactory::getObjectName($rhs_module));
}
SugarRelationshipFactory::rebuildCache();
}
示例2: delete
function delete($rel_name)
{
require_once "ModuleInstall/ModuleInstaller.php";
require_once 'modules/Administration/QuickRepairAndRebuild.php';
$mi = new ModuleInstaller();
$mi->silent = true;
$mi->uninstall_relationship("custom/metadata/{$rel_name}MetaData.php");
// now clear all caches so that our changes are visible
Relationship::delete_cache();
$mi->rebuild_tabledictionary();
$MBmodStrings = $GLOBALS['mod_strings'];
$GLOBALS['mod_strings'] = return_module_language('', 'Administration');
$rac = new RepairAndClear();
$rac->repairAndClearAll(array('clearAll', 'rebuildExtensions'), array($GLOBALS['mod_strings']['LBL_ALL_MODULES']), true, false);
$GLOBALS['mod_strings'] = $MBmodStrings;
}
示例3: delete
function delete($rel_name)
{
//Remove any fields from layouts
$rel = $this->get($rel_name);
if (!empty($rel)) {
$this->removeFieldsFromDeployedLayout($rel);
}
require_once "ModuleInstall/ModuleInstaller.php";
require_once 'modules/Administration/QuickRepairAndRebuild.php';
$mi = new ModuleInstaller();
$mi->silent = true;
$mi->uninstall_relationship("custom/metadata/{$rel_name}MetaData.php");
// now clear all caches so that our changes are visible
Relationship::delete_cache();
$mi->rebuild_tabledictionary();
$MBmodStrings = $GLOBALS['mod_strings'];
$GLOBALS['mod_strings'] = return_module_language('', 'Administration');
$rac = new RepairAndClear();
$rac->repairAndClearAll(array('clearAll', 'rebuildExtensions'), array($GLOBALS['mod_strings']['LBL_ALL_MODULES']), true, false);
$GLOBALS['mod_strings'] = $MBmodStrings;
//Bug 41070, supercedes the previous 40941 fix in this section
if (isset($this->relationships[$rel_name])) {
unset($this->relationships[$rel_name]);
}
}
示例4: setUp_dictionary
/**
* Registration of $dictionary in global scope
*
* @static
* @return bool is variable setuped or not
*/
protected static function setUp_dictionary()
{
self::setUp('beanFiles');
self::setUp('beanList');
self::$registeredVars['dictionary'] = true;
global $dictionary;
$dictionary = array();
$moduleInstaller = new ModuleInstaller();
$moduleInstaller->silent = true;
$moduleInstaller->rebuild_tabledictionary();
require 'modules/TableDictionary.php';
foreach ($GLOBALS['beanList'] as $k => $v) {
VardefManager::loadVardef($k, $v);
}
return true;
}
示例5: ModuleInstaller
// Implicitly set character set to skip browser buffer sniffing
header('Content-Type: text/html; charset=UTF-8');
// Bypass output buffering if enforced by FastCGI implementation
header('X-Accel-Buffering: no');
// Flush after each output so the user can see the progress in real-time
ob_implicit_flush();
// When output_buffering is enabled - which is recommended in production -
// make sure we flush the current output buffer(s) otherwise we are still
// buffering at this point and real-time updates wont make it to the screen.
while (@ob_end_flush()) {
}
require_once 'install/install_utils.php';
// since we need to make sure we have even the custom tabledictionary items in there
$mi = new ModuleInstaller();
$mi->silent = true;
$mi->rebuild_tabledictionary();
$mi->rebuild_vardefs();
require_once 'include/MetaDataManager/MetaDataManager.php';
MetaDataManager::disableCache();
include "modules/Trackers/tracker_perfMetaData.php";
include "modules/Trackers/tracker_queriesMetaData.php";
include "modules/Trackers/tracker_sessionsMetaData.php";
include "modules/Trackers/tracker_tracker_queriesMetaData.php";
require_once 'modules/TableDictionary.php';
$trackerManager = TrackerManager::getInstance();
$trackerManager->pause();
$cache_dir = sugar_cached("");
$line_entry_format = "     <b>";
$line_exit_format = "...   </b>";
$rel_dictionary = $dictionary;
// sourced by modules/TableDictionary.php
示例6: cleanCache
/**
* Clears cache.
*/
protected function cleanCache()
{
$mi = new ModuleInstaller();
$mi->silent = true;
Relationship::delete_cache();
$mi->rebuild_vardefs();
$mi->rebuild_tabledictionary();
}