本文整理汇总了PHP中UnifiedSearchAdvanced::retrieveEnabledAndDisabledModules方法的典型用法代码示例。如果您正苦于以下问题:PHP UnifiedSearchAdvanced::retrieveEnabledAndDisabledModules方法的具体用法?PHP UnifiedSearchAdvanced::retrieveEnabledAndDisabledModules怎么用?PHP UnifiedSearchAdvanced::retrieveEnabledAndDisabledModules使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UnifiedSearchAdvanced
的用法示例。
在下文中一共展示了UnifiedSearchAdvanced::retrieveEnabledAndDisabledModules方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
/**
* @see SugarView::display()
*/
public function display()
{
require_once 'modules/Home/UnifiedSearchAdvanced.php';
$usa = new UnifiedSearchAdvanced();
global $mod_strings, $app_strings, $app_list_strings;
$sugar_smarty = new Sugar_Smarty();
$sugar_smarty->assign('APP', $app_strings);
$sugar_smarty->assign('MOD', $mod_strings);
$sugar_smarty->assign('moduleTitle', $this->getModuleTitle(false));
$modules = $usa->retrieveEnabledAndDisabledModules();
$sugar_smarty->assign('enabled_modules', json_encode($modules['enabled']));
$sugar_smarty->assign('disabled_modules', json_encode($modules['disabled']));
$tpl = 'modules/Administration/templates/GlobalSearchSettings.tpl';
if (file_exists('custom/' . $tpl)) {
$tpl = 'custom/' . $tpl;
}
echo $sugar_smarty->fetch($tpl);
}
示例2: display
/**
* @see SugarView::display()
*/
public function display()
{
require_once 'modules/Home/UnifiedSearchAdvanced.php';
$usa = new UnifiedSearchAdvanced();
global $mod_strings, $app_strings, $app_list_strings, $current_user;
$sugar_smarty = new Sugar_Smarty();
$sugar_smarty->assign('APP', $app_strings);
$sugar_smarty->assign('MOD', $mod_strings);
$sugar_smarty->assign('moduleTitle', $this->getModuleTitle(false));
$modules = $usa->retrieveEnabledAndDisabledModules();
$sugar_smarty->assign('enabled_modules', json_encode($modules['enabled']));
$sugar_smarty->assign('disabled_modules', json_encode($modules['disabled']));
$defaultEngine = SugarSearchEngineFactory::getFTSEngineNameFromConfig();
$config = $GLOBALS['sugar_config']['full_text_engine'][$defaultEngine];
$justRequestedAScheduledIndex = !empty($_REQUEST['sched']) ? true : false;
$hide_fts_config = isset($GLOBALS['sugar_config']['hide_full_text_engine_config']) ? $GLOBALS['sugar_config']['hide_full_text_engine_config'] : false;
$showSchedButton = $defaultEngine != '' && $this->isFTSConnectionValid() ? true : false;
$sugar_smarty->assign("showSchedButton", $showSchedButton);
$sugar_smarty->assign("hide_fts_config", $hide_fts_config);
$sugar_smarty->assign("fts_type", get_select_options_with_id($app_list_strings['fts_type'], $defaultEngine));
$sugar_smarty->assign("fts_host", $config['host']);
$sugar_smarty->assign("fts_port", $config['port']);
$sugar_smarty->assign("fts_scheduled", !empty($schedulerID) && !$schedulerCompleted);
$sugar_smarty->assign('justRequestedAScheduledIndex', $justRequestedAScheduledIndex);
//End FTS
if (is_admin($current_user)) {
if (!empty($GLOBALS['sugar_config']['fts_disable_notification'])) {
displayAdminError(translate('LBL_FTS_DISABLED', 'Administration'));
}
// if fts indexing is done, show the notification to admin
$admin = Administration::getSettings();
if (!empty($admin->settings['info_fts_index_done'])) {
displayAdminError(translate('LBL_FTS_INDEXING_DONE', 'Administration'));
// reset flag
$admin->saveSetting('info', 'fts_index_done', 0);
}
}
echo $sugar_smarty->fetch(SugarAutoLoader::existingCustomOne('modules/Administration/templates/GlobalSearchSettings.tpl'));
}
示例3: clearCache
/**
*
* Clear FTS metadata cache
*/
public static function clearCache()
{
// clear possible cache entries per module
$usa = new UnifiedSearchAdvanced();
$list = $usa->retrieveEnabledAndDisabledModules();
foreach ($list as $modules) {
foreach ($modules as $module) {
$cacheKey = self::FTS_FIELDS_CACHE_KEY_PREFIX . $module['module'];
sugar_cache_clear($cacheKey);
}
}
// clear master list of enabled modules
sugar_cache_clear(self::ENABLE_MODULE_CACHE_KEY);
}