CRM-15856 - Mailing BAO - Only validate tokens when calling through API
[civicrm-core.git] / api / v3 / ContributionPage.php
index bff43b90c470ad957e7aef5eebb4e1a30ee785e7..ddf9b344fb0395ae361fd04233fafbcbd648c396 100644 (file)
@@ -1,8 +1,7 @@
 <?php
-/*
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 
 /**
- * File for the CiviCRM APIv3 group functions
+ * This api exposes CiviCRM contribution pages.
  *
  * @package CiviCRM_APIv3
- * @subpackage API_ContributionPage
- * @copyright CiviCRM LLC (c) 20042012
  */
 
 /**
- * Create or update a contribution_page
+ * 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
+ * @param array $params
+ *   Array per getfields metadata.
  *
- * @return array api result array
- * {@getfields contribution_page_create}
- * @access public
+ * @return array
+ *   api result array
  */
 function civicrm_api3_contribution_page_create($params) {
   $result = _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params);
@@ -54,10 +49,12 @@ function civicrm_api3_contribution_page_create($params) {
 }
 
 /**
- * Adjust Metadata for Create action
+ * Adjust Metadata for Create action.
+ *
+ * The metadata is used for setting defaults, documentation & validation.
  *
- * The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ *   Array per getfields metadata.
  */
 function _civicrm_api3_contribution_page_create_spec(&$params) {
   $params['financial_type_id']['api.required'] = 1;
@@ -66,49 +63,42 @@ function _civicrm_api3_contribution_page_create_spec(&$params) {
 }
 
 /**
- * Returns array of contribution_pages  matching a set of one or more group properties
+ * Returns array of contribution_pages matching a set of one or more group properties.
  *
- * @param array $params Array of one or more valid property_name=>value pairs.
+ * @param array $params
+ *   Array per getfields metadata.
  *
- * @return array API Result array Array of matching contribution_pages
- * {@getfields contribution_page_get}
- * @access public
+ * @return array
+ *   API Result array Array of matching contribution_pages
  */
 function civicrm_api3_contribution_page_get($params) {
   return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
 }
 
 /**
- * delete an existing contribution_page
+ * 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
+ * @param array $params
+ *   Array per getfields metadata.
  *
- * @return array  (referance) returns flag true if successfull, error
- *                message otherwise
- * {@getfields contribution_page_delete}
- * @access public
+ * @return array
+ *   API result Array
  */
 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
+ * Submit a contribution_page.
  *
- * @param array $params  (reference) array containing id of the group
- *                       to be deleted
+ * @param array $params
+ *   Array per getfields metadata.
  *
- * @return array  (referance) returns flag true if successfull, error
- *                message otherwise
- * {@getfields contribution_page_delete}
- * @access public
+ * @return array
+ *   API result array
  */
 function civicrm_api3_contribution_page_submit($params) {
   $result = CRM_Contribute_Form_Contribution_Confirm::submit($params);