本文整理汇总了PHP中ModuleInstaller::getBaseConfig方法的典型用法代码示例。如果您正苦于以下问题:PHP ModuleInstaller::getBaseConfig方法的具体用法?PHP ModuleInstaller::getBaseConfig怎么用?PHP ModuleInstaller::getBaseConfig使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModuleInstaller
的用法示例。
在下文中一共展示了ModuleInstaller::getBaseConfig方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
public function run()
{
if (!$this->toFlavor('pro')) {
return;
}
require_once 'ModuleInstall/ModuleInstaller.php';
$this->putFile($this->cacheDir('config.js'), ModuleInstaller::getJSConfig(ModuleInstaller::getBaseConfig()));
}
示例2: preDisplay
/**
* This method checks to see if the configuration file exists and, if not, creates one by default
*
*/
public function preDisplay()
{
global $app_strings;
//Rebuild config file if it doesn't exist
if (!file_exists($this->configFile)) {
ModuleInstaller::handleBaseConfig();
}
$this->ss->assign("configFile", $this->configFile);
$config = ModuleInstaller::getBaseConfig();
$this->ss->assign('configHash', md5(serialize($config)));
$sugarSidecarPath = ensureJSCacheFilesExist();
$this->ss->assign("sugarSidecarPath", $sugarSidecarPath);
// TODO: come up with a better way to deal with the various JS files
// littered in sidecar.tpl.
$voodooFile = 'custom/include/javascript/voodoo.js';
if (SugarAutoLoader::fileExists($voodooFile)) {
$this->ss->assign('voodooFile', $voodooFile);
}
//Load sidecar theme css
$theme = new SidecarTheme();
$this->ss->assign("css_url", $theme->getCSSURL());
$this->ss->assign("developerMode", inDeveloperMode());
//Loading label
$this->ss->assign('LBL_LOADING', $app_strings['LBL_ALERT_TITLE_LOADING']);
$this->ss->assign('LBL_ENABLE_JAVASCRIPT', $app_strings['LBL_ENABLE_JAVASCRIPT']);
$slFunctionsPath = inDeveloperMode() ? "cache/Expressions/functions_cache_debug.js" : "cache/Expressions/functions_cache.js";
if (!is_file($slFunctionsPath)) {
$GLOBALS['updateSilent'] = true;
include "include/Expressions/updatecache.php";
}
$this->ss->assign("SLFunctionsPath", $slFunctionsPath);
if (!empty($this->authorization)) {
$this->ss->assign('appPrefix', $config['env'] . ":" . $config['appId'] . ":");
$this->ss->assign('authorization', $this->authorization);
}
}