public function tearDown()
 {
     parent::tearDown();
     CRM_Core_ManagedEntities::singleton(TRUE)->reconcile();
 }
 static function rebuildMenuAndCaches($triggerRebuild = FALSE, $sessionReset = FALSE)
 {
     $config = CRM_Core_Config::singleton();
     $config->clearModuleList();
     // also cleanup all caches
     $config->cleanupCaches($sessionReset || CRM_Utils_Request::retrieve('sessionReset', 'Boolean', CRM_Core_DAO::$_nullObject, FALSE, 0, 'GET'));
     CRM_Core_Menu::store();
     // also reset navigation
     CRM_Core_BAO_Navigation::resetNavigation();
     // also cleanup module permissions
     $config->cleanupPermissions();
     // also rebuild word replacement cache
     CRM_Core_BAO_WordReplacement::rebuild();
     CRM_Core_BAO_Setting::updateSettingsFromMetaData();
     CRM_Core_Resources::singleton()->resetCacheCode();
     // also rebuild triggers if requested explicitly
     if ($triggerRebuild || CRM_Utils_Request::retrieve('triggerRebuild', 'Boolean', CRM_Core_DAO::$_nullObject, FALSE, 0, 'GET')) {
         CRM_Core_DAO::triggerRebuild();
     }
     CRM_Core_DAO_AllCoreTables::reinitializeCache(TRUE);
     CRM_Core_ManagedEntities::singleton(TRUE)->reconcile();
 }
示例#3
0
 /**
  * @param bool $triggerRebuild
  * @param bool $sessionReset
  *
  * @throws Exception
  */
 public static function rebuildMenuAndCaches($triggerRebuild = FALSE, $sessionReset = FALSE)
 {
     $config = CRM_Core_Config::singleton();
     $config->clearModuleList();
     // also cleanup all caches
     $config->cleanupCaches($sessionReset || CRM_Utils_Request::retrieve('sessionReset', 'Boolean', CRM_Core_DAO::$_nullObject, FALSE, 0, 'GET'));
     CRM_Core_Menu::store();
     // also reset navigation
     CRM_Core_BAO_Navigation::resetNavigation();
     // also cleanup module permissions
     $config->cleanupPermissions();
     // rebuild word replacement cache - pass false to prevent operations redundant with this fn
     CRM_Core_BAO_WordReplacement::rebuild(FALSE);
     Civi::service('settings_manager')->flush();
     // Clear js caches
     CRM_Core_Resources::singleton()->flushStrings()->resetCacheCode();
     CRM_Case_XMLRepository::singleton(TRUE);
     // also rebuild triggers if requested explicitly
     if ($triggerRebuild || CRM_Utils_Request::retrieve('triggerRebuild', 'Boolean', CRM_Core_DAO::$_nullObject, FALSE, 0, 'GET')) {
         CRM_Core_DAO::triggerRebuild();
     }
     CRM_Core_DAO_AllCoreTables::reinitializeCache(TRUE);
     CRM_Core_ManagedEntities::singleton(TRUE)->reconcile();
     //CRM-16257 update Config.IDS.ini might be an old copy
     CRM_Core_IDS::createConfigFile(TRUE);
 }
示例#4
0
 /**
  * @inheritDoc
  * @return array
  * @throws CRM_Core_Exception
  */
 public function getManagedEntities()
 {
     $entities = array_merge(CRM_Case_ManagedEntities::createManagedCaseTypes(), CRM_Case_ManagedEntities::createManagedActivityTypes(CRM_Case_XMLRepository::singleton(), CRM_Core_ManagedEntities::singleton()), CRM_Case_ManagedEntities::createManagedRelationshipTypes(CRM_Case_XMLRepository::singleton(), CRM_Core_ManagedEntities::singleton()));
     return $entities;
 }
 /**
  * Perform an asynchronous reconciliation when the transaction ends.
  */
 public static function scheduleReconcilation()
 {
     CRM_Core_Transaction::addCallback(CRM_Core_Transaction::PHASE_POST_COMMIT, function () {
         CRM_Core_ManagedEntities::singleton(TRUE)->reconcile();
     }, array(), 'ManagedEntities::reconcile');
 }
 static function rebuildMenuAndCaches($triggerRebuild = FALSE, $sessionReset = FALSE)
 {
     $config = CRM_Core_Config::singleton();
     $config->clearModuleList();
     CRM_Core_Menu::store();
     // also reset navigation
     CRM_Core_BAO_Navigation::resetNavigation();
     // also cleanup all caches
     $config->cleanupCaches($sessionReset || CRM_Utils_Request::retrieve('sessionReset', 'Boolean', CRM_Core_DAO::$_nullObject, FALSE, 0, 'GET'));
     // also rebuild triggers if requested explicitly
     if ($triggerRebuild || CRM_Utils_Request::retrieve('triggerRebuild', 'Boolean', CRM_Core_DAO::$_nullObject, FALSE, 0, 'GET')) {
         CRM_Core_DAO::triggerRebuild();
     }
     CRM_Core_ManagedEntities::singleton(TRUE)->reconcile();
 }
 public function upgrade_1_3_002()
 {
     CRM_Core_ManagedEntities::singleton(TRUE)->reconcile();
     return TRUE;
 }