本文整理汇总了PHP中ModuleInstaller::handlePortalConfig方法的典型用法代码示例。如果您正苦于以下问题:PHP ModuleInstaller::handlePortalConfig方法的具体用法?PHP ModuleInstaller::handlePortalConfig怎么用?PHP ModuleInstaller::handlePortalConfig使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModuleInstaller
的用法示例。
在下文中一共展示了ModuleInstaller::handlePortalConfig方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadCleanConfig
$config_check = $mod_strings['MSG_CONFIG_FILE_READY_FOR_REBUILD'];
$disable_config_rebuild = '';
$config_file_ready = true;
} else {
$config_check = $mod_strings['MSG_MAKE_CONFIG_FILE_WRITABLE'];
}
// only do the rebuild if config file checks out and user has posted back
if (!empty($_POST['perform_rebuild']) && $config_file_ready) {
// retrieve configuration from file so that contents of config_override.php
// is not merged (bug #54403)
$clean_config = loadCleanConfig();
if (rebuildConfigFile($clean_config, $sugar_version)) {
$config_check = $mod_strings['MSG_CONFIG_FILE_REBUILD_SUCCESS'];
$disable_config_rebuild = 'disabled="disabled"';
} else {
$config_check = $mod_strings['MSG_CONFIG_FILE_REBUILD_FAILED'];
}
require_once 'ModuleInstall/ModuleInstaller.php';
ModuleInstaller::handleBaseConfig();
ModuleInstaller::handlePortalConfig();
}
/////////////////////////////////////////////////////////////////////
// TEMPLATE ASSIGNING
$xtpl = new XTemplate('modules/Administration/RebuildConfig.html');
$xtpl->assign('LBL_CONFIG_CHECK', $mod_strings['LBL_CONFIG_CHECK']);
$xtpl->assign('CONFIG_CHECK', $config_check);
$xtpl->assign('LBL_PERFORM_REBUILD', $lbl_rebuild_config);
$xtpl->assign('DISABLE_CONFIG_REBUILD', $disable_config_rebuild);
$xtpl->assign('BTN_PERFORM_REBUILD', $btn_rebuild_config);
$xtpl->parse('main');
$xtpl->out('main');
示例2: savePortalSettings
/**
* Saves Portal settings in the database.
*
* @param array $portalConfig an array containing Portal settings to save.
*/
private function savePortalSettings(array $portalConfig)
{
//TODO: Remove after we resolve issues with test associated to this
$GLOBALS['log']->info('Updating portal config');
foreach ($portalConfig as $fieldKey => $fieldValue) {
// TODO: category should be `support`, platform should be `portal`
$admin = $this->getAdministrationBean();
if (!$admin->saveSetting('portal', $fieldKey, json_encode($fieldValue), 'support')) {
$GLOBALS['log']->fatal("Error saving portal config var {$fieldKey}, orig: {$fieldValue} , json:" . json_encode($fieldValue));
}
}
// Verify the existence of the javascript config file
if (!file_exists('portal2/config.js')) {
require_once 'ModuleInstall/ModuleInstaller.php';
ModuleInstaller::handlePortalConfig();
}
}
示例3: repairPortalConfig
/**
* Rebuild the portal javascript config file.
*/
public function repairPortalConfig()
{
require_once 'ModuleInstall/ModuleInstaller.php';
ModuleInstaller::handlePortalConfig();
}
示例4: handlePortalConfig
/**
* handles portal config creation
*/
function handlePortalConfig()
{
require_once 'ModuleInstall/ModuleInstaller.php';
return ModuleInstaller::handlePortalConfig();
}