本文整理汇总了PHP中CRM_Utils_File::flushDynamicResources方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Utils_File::flushDynamicResources方法的具体用法?PHP CRM_Utils_File::flushDynamicResources怎么用?PHP CRM_Utils_File::flushDynamicResources使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Utils_File
的用法示例。
在下文中一共展示了CRM_Utils_File::flushDynamicResources方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: rebuildMenuAndCaches
/**
* @param bool $triggerRebuild
* @param bool $sessionReset
*
* @throws Exception
*/
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();
// Clear dynamic js files
CRM_Utils_File::flushDynamicResources();
CRM_Core_BAO_Setting::updateSettingsFromMetaData();
CRM_Core_Resources::singleton()->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();
}
示例2: rebuild
/**
* Rebuild
*/
static function rebuild()
{
$id = CRM_Core_Config::domainID();
$stringOverride = self::getAllAsConfigArray($id);
$params = array('locale_custom_strings' => serialize($stringOverride));
$wordReplacementSettings = CRM_Core_BAO_Domain::edit($params, $id);
if ($wordReplacementSettings) {
CRM_Core_Config::singleton()->localeCustomStrings = $stringOverride;
// Reset navigation
CRM_Core_BAO_Navigation::resetNavigation();
// Clear js string cache
CRM_Core_Resources::singleton()->flushStrings();
// Clear dynamic js files which may contain localization
CRM_Utils_File::flushDynamicResources();
return TRUE;
}
return FALSE;
}