/**
 * 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;
}
Ejemplo n.º 2
0
 /**
  * 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;
 }