/*
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
* @access public
*/
function civicrm_api3_contribution_page_create($params) {
- return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params);
+ $result = _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params);
+ CRM_Contribute_PseudoConstant::flush('contributionPageAll');
+ CRM_Contribute_PseudoConstant::flush('contributionPageActive');
+ return $result;
}
/**
* This method is used to delete any existing contribution_page. id of the group
* to be deleted is required field in $params array
*
- * @param array $params (reference) array containing id of the group
+ * @param array $params array containing id of the group
* to be deleted
*
- * @return array (referance) returns flag true if successfull, error
- * message otherwise
+ * @return array API result Array
* {@getfields contribution_page_delete}
* @access public
*/
function civicrm_api3_contribution_page_delete($params) {
return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
+
+/**
+ * delete an existing contribution_page
+ *
+ * This method is used to delete any existing contribution_page. id of the group
+ * to be deleted is required field in $params array
+ *
+ * @param array $params (reference) array containing id of the group
+ * to be deleted
+ *
+ * @return array API result array
+ * {@getfields contribution_page_delete}
+ * @access public
+ */
+function civicrm_api3_contribution_page_submit($params) {
+ $result = CRM_Contribute_Form_Contribution_Confirm::submit($params);
+ return civicrm_api3_create_success($result, $params, 'contribution_page', 'submit');
+}