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


PHP UnifiedSearchAdvanced::retrieveEnabledAndDisabledModules方法代码示例

本文整理汇总了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);
 }
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:21,代码来源:view.globalsearchsettings.php

示例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'));
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:42,代码来源:view.globalsearchsettings.php

示例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);
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:18,代码来源:SugarSearchEngineMetadataHelper.php


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