本文整理汇总了PHP中CRM_Contribute_PseudoConstant::flush方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Contribute_PseudoConstant::flush方法的具体用法?PHP CRM_Contribute_PseudoConstant::flush怎么用?PHP CRM_Contribute_PseudoConstant::flush使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Contribute_PseudoConstant
的用法示例。
在下文中一共展示了CRM_Contribute_PseudoConstant::flush方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: civicrm_api3_contribution_page_create
/**
* Create or update a contribution_page
*
* @param array $params Associative array of property
* name/value pairs to insert in new 'contribution_page'
* @example ContributionPageCreate.php Std Create example
*
* @return array api result array
* {@getfields contribution_page_create}
* @access public
*/
function civicrm_api3_contribution_page_create($params)
{
$result = _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params);
CRM_Contribute_PseudoConstant::flush('contributionPageAll');
CRM_Contribute_PseudoConstant::flush('contributionPageActive');
return $result;
}
示例2: flushFinancialTypeStatics
/**
* Flush statics relating to financial type.
*/
protected function flushFinancialTypeStatics()
{
if (isset(\Civi::$statics['CRM_Financial_BAO_FinancialType'])) {
unset(\Civi::$statics['CRM_Financial_BAO_FinancialType']);
}
if (isset(\Civi::$statics['CRM_Contribute_PseudoConstant'])) {
unset(\Civi::$statics['CRM_Contribute_PseudoConstant']);
}
CRM_Contribute_PseudoConstant::flush('financialType');
CRM_Contribute_PseudoConstant::flush('membershipType');
// Pseudoconstants may be saved to the cache table.
CRM_Core_DAO::executeQuery("TRUNCATE civicrm_cache");
CRM_Financial_BAO_FinancialType::$_statusACLFt = array();
CRM_Financial_BAO_FinancialType::$_availableFinancialTypes = NULL;
}