* File for the CiviCRM APIv3 API wrapper
*
* @package CiviCRM_APIv3
- * @subpackage API
*
* @copyright CiviCRM LLC (c) 2004-2014
*/
<?php
/**
- * @file
- * File for the CiviCRM APIv3 API wrapper.
+ * @file CiviCRM APIv3 API wrapper.
*
* @package CiviCRM_APIv3
- * @subpackage API
- *
- * @copyright CiviCRM LLC (c) 2004-2014
- * @version $Id: api.php 30486 2010-11-02 16:12:09Z shot $
*/
/**
* This api exposes CiviCRM acl.
*
* @package CiviCRM_APIv3
- * @subpackage API_acl
*/
/**
* Save an acl.
*
- * {@getfields acl_create}
- * @example aclCreate.php
- *
* @param array $params
*
* @return array
* This api exposes CiviCRM acl_role.
*
* @package CiviCRM_APIv3
- * @subpackage API_acl_role
*/
/**
*/
/**
- * File for the CiviCRM APIv3 for Scheduled Reminders
+ * This api exposes CiviCRM Scheduled Reminders.
*
* @package CiviCRM_APIv3
- * @subpackage API_ActionSchedule
- *
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_action_schedule_create_spec(&$params) {
$params['title']['api.required'] = TRUE;
* Delete an existing action_schedule.
*
* @param array $params
- * Array containing id of the action_schedule.
- * to be deleted
+ * Array containing id of the action_schedule to be deleted.
*
* @return array
* API result array
* This api exposes CiviCRM activity.
*
* @package CiviCRM_APIv3
- * @subpackage API_Activity
*/
/**
* Given a list of activities, append any extra data requested about the activities.
*
- * NOTE: Called by civicrm-core and CiviHR
+ * @note Called by civicrm-core and CiviHR
*
* @param array $params
* API request parameters.
* This api exposes CiviCRM activity contact.
*
* @package CiviCRM_APIv3
- * @subpackage API_ActivityContact
- *
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_activity_contact_create_spec(&$params) {
$params['contact_id']['api.required'] = 1;
* @deprecated
*
* @package CiviCRM_APIv3
- * @subpackage API_Activity
*/
/**
* @return array
* created / updated activity type
*
- * @deprecated - use option_value create
+ * @deprecated use option_value api
*/
function civicrm_api3_activity_type_create($params) {
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_activity_type_create_spec(&$params) {
$params['label']['api.required'] = 1;
* @return array
* API result array
*
- * @deprecated - we will introduce OptionValue Delete- plse consider helping with this if not done
+ * @deprecated use option_value api
*/
function civicrm_api3_activity_type_delete($params) {
return civicrm_api3_create_success(CRM_Core_BAO_OptionValue::del($params['id']), $params);
*/
/**
- * This api exposes CiviCRM address.
+ * This api exposes CiviCRM address records.
*
* @package CiviCRM_APIv3
- * @subpackage API_Address
- *
*/
/**
* Adjust Metadata for Create action.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_address_create_spec(&$params) {
$params['location_type_id']['api.required'] = 1;
* "check_permissions"==false)
*
* @package CiviCRM_APIv3
- * @subpackage API_Attachment
*/
/**
* This api exposes CiviCRM batch.
*
* @package CiviCRM_APIv3
- * @subpackage API_Batch
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_batch_create_spec(&$params) {
//@todo - the entity table field looks like it is not actually required & should probably be removed (or a description added if
*/
/**
- * This api exposes CiviCRM campaign.
+ * This api exposes CiviCRM campaign records.
+ *
+ * @note Campaign component must be enabled.
*
* @package CiviCRM_APIv3
- * @subpackage API_Campaign
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_campaign_create_spec(&$params) {
$params['title']['api.required'] = 1;
*/
/**
- * This api exposes CiviCRM Case.
+ * This api exposes CiviCRM Case objects.
* Developed by woolman.org
*
* @package CiviCRM_APIv3
- * @subpackage API_Case
*/
* Open a new case, add client and manager roles, and add standard timeline.
*
* @param array $params
+ * @code
* //REQUIRED:
* 'case_type_id' => int OR
* 'case_type' => str (provide one or the other)
* 'start_date' => str datestamp // defaults to: date('YmdHis')
* 'duration' => int // in minutes
* 'details' => str // html format
+ * @endcode
*
* @throws API_Exception
* @return array
* Adjust Metadata for Create Action.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_case_create_spec(&$params) {
$params['contact_id']['api.aliases'] = array('client_id');
* Adjust Metadata for Update action.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_case_update_spec(&$params) {
$params['id']['api.required'] = 1;
* Adjust Metadata for Delete action.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_case_delete_spec(&$params) {
$params['id']['api.required'] = 1;
}
}
-/***********************************/
-/* */
-/* INTERNAL FUNCTIONS */
-/* */
-/***********************************/
-
/**
* Internal function to retrieve a case.
*
* This api exposes CiviCRM Case.
*
* @package CiviCRM_APIv3
- * @subpackage API_Case
*/
/**
* @deprecated
* The constant api is deprecated as of CiviCRM 4.4. Please use the getoptions api action instead.
* @package CiviCRM_APIv3
- * @subpackage API_Constant
*/
/**
*
* @param array $params
* Name of a public static method of
- * CRM_Core_PseudoConstant: one of
+ * CRM_Core_PseudoConstant: one of
* <ul>
* <li>activityStatus</li>
* <li>activityType</li>
* This api exposes CiviCRM contacts.
* Contacts are the main entity in CiviCRM and this api is more robust than most.
* - Get action allows all params supported by advanced search.
- * - Create action allows creating several other entities at once (e.g. email).
+ * - Create action allows creating several related entities at once (e.g. email).
* - Create allows checking for duplicate contacts.
* Use getfields to list the full range of parameters and options supported by each action.
*
* @package CiviCRM_APIv3
- * @subpackage API_Contact
*/
/**
* Adjust Metadata for Create action.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_contact_create_spec(&$params) {
$params['contact_type']['api.required'] = 1;
* Adjust Metadata for Get action.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_contact_get_spec(&$params) {
$params['contact_is_deleted']['api.default'] = 0;
* Merges given pair of duplicate contacts.
*
* @param array $params
- * Input parameters.
- *
- * Allowed @params array keys are:
- * {int main_id main contact id with whom merge has to happen}
- * {int other_id duplicate contact which would be deleted after merge operation}
- * {string mode helps decide how to behave when there are conflicts.
- * A 'safe' value skips the merge if there are no conflicts. Does a force merge otherwise.}
- * {boolean auto_flip wether to let api decide which contact to retain and which to delete.}
+ * Allowed array keys are:
+ * -int main_id: main contact id with whom merge has to happen
+ * -int other_id: duplicate contact which would be deleted after merge operation
+ * -string mode: "safe" skips the merge if there are no conflicts. Does a force merge otherwise.
+ * -boolean auto_flip: whether to let api decide which contact to retain and which to delete.
*
* @return array
* API Result Array
*/
/**
- * This api exposes CiviCRM contact type.
+ * This api exposes CiviCRM contact types and sub-types.
+ *
+ * CiviCRM comes with 3 primary contact types - Individual, Organization & Household.
+ * Changing these is not advised, but sub_types can be created with this api.
+ * Pass 'parent_id' param to specify which base type a new sub_type extends.
*
* @package CiviCRM_APIv3
- * @subpackage API_Survey
*/
/**
*/
/**
- * This api exposes CiviCRM Contribution.
+ * This api exposes CiviCRM Contribution records.
*
* @package CiviCRM_APIv3
- * @subpackage API_Contribute
- *
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_contribution_create_spec(&$params) {
$params['contact_id']['api.required'] = 1;
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_contribution_get_spec(&$params) {
$params['contribution_test']['api.default'] = 0;
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_contribution_transact_spec(&$params) {
$fields = civicrm_api3('contribution', 'getfields', array('action' => 'create'));
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_contribution_sendconfirmation_spec(&$params) {
$params['id'] = array(
* This api exposes CiviCRM contribution pages.
*
* @package CiviCRM_APIv3
- * @subpackage API_ContributionPage
*/
/**
* This api exposes CiviCRM recurring contributions.
*
* @package CiviCRM_APIv3
- * @subpackage API_ContributionRecur
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_contribution_recur_create_spec(&$params) {
$params['contact_id']['api.required'] = 1;
* Returns array of contribution_recurs matching a set of one or more group properties.
*
* @param array $params
- * Array of one or more valid.
- * property_name=>value pairs. If $params is set
- * as null, all contribution_recurs will be returned
+ * Array of properties. If empty, all records will be returned.
*
* @return array
* API result Array of matching contribution_recurs
* This api exposes CiviCRM soft credit.
*
* @package CiviCRM_APIv3
- * @subpackage API_ContributionSoft
- *
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_contribution_soft_create_spec(&$params) {
$params['contribution_id']['api.required'] = 1;
* This api exposes CiviCRM country.
*
* @package CiviCRM_APIv3
- * @subpackage API_Country
- *
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_country_create_spec(&$params) {
$params['name']['api.required'] = 1;
* This api exposes CiviCRM custom field.
*
* @package CiviCRM_APIv3
- * @subpackage API_CustomField
- *
*/
/**
* Adjust Metadata for Create action.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_custom_field_create_spec(&$params) {
$params['label']['api.required'] = 1;
* This api exposes CiviCRM custom group.
*
* @package CiviCRM_APIv3
- * @subpackage API_CustomGroup
- *
*/
/**
* Adjust Metadata for Create action.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_custom_group_create_spec(&$params) {
$params['extends']['api.required'] = 1;
* This api exposes CiviCRM custom search.
*
* @package CiviCRM_APIv3
- * @subpackage API_CustomSearch
- *
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_custom_search_create_spec(&$params) {
require_once 'api/v3/OptionValue.php';
* This api exposes CiviCRM custom value.
*
* @package CiviCRM_APIv3
- * @subpackage API_CustomField
- *
*/
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_custom_value_create_spec(&$params) {
$params['entity_id']['api.required'] = 1;
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_custom_value_get_spec(&$params) {
$params['entity_id']['api.required'] = 1;
* This api exposes CiviCRM Dashboard.
*
* @package CiviCRM_APIv3
- * @subpackage API_Activity
*/
* This api exposes CiviCRM dashboard contacts.
*
* @package CiviCRM_APIv3
- * @subpackage API_ActionSchedule
- *
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_dashboard_contact_create_spec(&$params) {
unset($params['version']);
* This api exposes CiviCRM domain.
*
* @package CiviCRM_APIv3
- * @subpackage API_Domain
- *
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_domain_get_spec(&$params) {
$params['current_domain'] = array('title' => "get loaded domain");
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_domain_create_spec(&$params) {
$params['domain_version'] = $params['version'];
* This api exposes CiviCRM email.
*
* @package CiviCRM_APIv3
- * @subpackage API_Email
- *
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_email_create_spec(&$params) {
// TODO a 'clever' default should be introduced
* This api exposes CiviCRM entity tag.
*
* @package CiviCRM_APIv3
- * @subpackage API_EntityTag
- *
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_entity_tag_get_spec(&$params) {
$params['entity_id']['api.aliases'] = array('contact_id');
* This api exposes CiviCRM event.
*
* @package CiviCRM_APIv3
- * @subpackage API_Event
- *
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_event_create_spec(&$params) {
$params['start_date']['api.required'] = 1;
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_event_get_spec(&$params) {
$params['financial_type_id']['api.aliases'] = array('contribution_type_id');
* This api exposes CiviCRM extension.
*
* @package CiviCRM_APIv3
- * @subpackage API_Extension
- *
*/
/**
* @throws API_Exception
* @return array
* API result
- * @example ExtensionDownload.php
*/
function civicrm_api3_extension_download($params) {
if (!array_key_exists('key', $params)) {
*/
/**
- * This api allows minimal handling with the CiviCRM file DAO.
+ * This api is a simple wrapper of the CiviCRM file DAO.
+ *
* Creating and updating files is a complex process and this api is usually insufficient.
* Use the "Attachment" api instead for more robust file handling.
*
* @fixme no unit tests
* @package CiviCRM_APIv3
- * @subpackage API_File
*/
/**
* Create a file record.
- * Note: This is only one of several steps needed to create a file in CiviCRM.
+ * @note This is only one of several steps needed to create a file in CiviCRM.
* Use the "Attachment" api to better handle all steps.
*
* @param array $params
* This api exposes CiviCRM financial_account.
*
* @package CiviCRM_APIv3
- * @subpackage API_financial_account
*/
/**
* This api exposes CiviCRM financial_type.
*
* @package CiviCRM_APIv3
- * @subpackage API_financial_type
*/
/**
<?php
+/*
+ +--------------------------------------------------------------------+
+ | CiviCRM version 4.6 |
+ +--------------------------------------------------------------------+
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+ +--------------------------------------------------------------------+
+ | This file is a part of CiviCRM. |
+ | |
+ | CiviCRM is free software; you can copy, modify, and distribute it |
+ | under the terms of the GNU Affero General Public License |
+ | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+ | |
+ | CiviCRM is distributed in the hope that it will be useful, but |
+ | WITHOUT ANY WARRANTY; without even the implied warranty of |
+ | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+ | See the GNU Affero General Public License for more details. |
+ | |
+ | You should have received a copy of the GNU Affero General Public |
+ | License and the CiviCRM Licensing Exception along |
+ | with this program; if not, contact CiviCRM LLC |
+ | at info[AT]civicrm[DOT]org. If you have questions about the |
+ | GNU Affero General Public License or the licensing of CiviCRM, |
+ | see the CiviCRM license FAQ at http://civicrm.org/licensing |
+ +--------------------------------------------------------------------+
+ */
+
+/**
+ * @package CiviCRM_APIv3
+ */
/**
* Get information about fields for a given api request.
<?php
/*
+--------------------------------------------------------------------+
-| CiviCRM version 4.6 |
-+--------------------------------------------------------------------+
-| Copyright CiviCRM LLC (c) 2004-2014 |
-+--------------------------------------------------------------------+
-| This file is a part of CiviCRM. |
-| |
-| CiviCRM is free software; you can copy, modify, and distribute it |
-| under the terms of the GNU Affero General Public License |
-| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
-| |
-| CiviCRM is distributed in the hope that it will be useful, but |
-| WITHOUT ANY WARRANTY; without even the implied warranty of |
-| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
-| See the GNU Affero General Public License for more details. |
-| |
-| You should have received a copy of the GNU Affero General Public |
-| License and the CiviCRM Licensing Exception along |
-| with this program; if not, contact CiviCRM LLC |
-| at info[AT]civicrm[DOT]org. If you have questions about the |
-| GNU Affero General Public License or the licensing of CiviCRM, |
-| see the CiviCRM license FAQ at http://civicrm.org/licensing |
-+--------------------------------------------------------------------+
+ | CiviCRM version 4.6 |
+ +--------------------------------------------------------------------+
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+ +--------------------------------------------------------------------+
+ | This file is a part of CiviCRM. |
+ | |
+ | CiviCRM is free software; you can copy, modify, and distribute it |
+ | under the terms of the GNU Affero General Public License |
+ | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+ | |
+ | CiviCRM is distributed in the hope that it will be useful, but |
+ | WITHOUT ANY WARRANTY; without even the implied warranty of |
+ | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+ | See the GNU Affero General Public License for more details. |
+ | |
+ | You should have received a copy of the GNU Affero General Public |
+ | License and the CiviCRM Licensing Exception along |
+ | with this program; if not, contact CiviCRM LLC |
+ | at info[AT]civicrm[DOT]org. If you have questions about the |
+ | GNU Affero General Public License or the licensing of CiviCRM, |
+ | see the CiviCRM license FAQ at http://civicrm.org/licensing |
+ +--------------------------------------------------------------------+
+ */
+
+/**
+ * @package CiviCRM_APIv3
*/
/**
<?php
/*
+--------------------------------------------------------------------+
-| CiviCRM version 4.6 |
-+--------------------------------------------------------------------+
-| Copyright CiviCRM LLC (c) 2004-2014 |
-+--------------------------------------------------------------------+
-| This file is a part of CiviCRM. |
-| |
-| CiviCRM is free software; you can copy, modify, and distribute it |
-| under the terms of the GNU Affero General Public License |
-| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
-| |
-| CiviCRM is distributed in the hope that it will be useful, but |
-| WITHOUT ANY WARRANTY; without even the implied warranty of |
-| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
-| See the GNU Affero General Public License for more details. |
-| |
-| You should have received a copy of the GNU Affero General Public |
-| License and the CiviCRM Licensing Exception along |
-| with this program; if not, contact CiviCRM LLC |
-| at info[AT]civicrm[DOT]org. If you have questions about the |
-| GNU Affero General Public License or the licensing of CiviCRM, |
-| see the CiviCRM license FAQ at http://civicrm.org/licensing |
-+--------------------------------------------------------------------+
+ | CiviCRM version 4.6 |
+ +--------------------------------------------------------------------+
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+ +--------------------------------------------------------------------+
+ | This file is a part of CiviCRM. |
+ | |
+ | CiviCRM is free software; you can copy, modify, and distribute it |
+ | under the terms of the GNU Affero General Public License |
+ | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+ | |
+ | CiviCRM is distributed in the hope that it will be useful, but |
+ | WITHOUT ANY WARRANTY; without even the implied warranty of |
+ | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+ | See the GNU Affero General Public License for more details. |
+ | |
+ | You should have received a copy of the GNU Affero General Public |
+ | License and the CiviCRM Licensing Exception along |
+ | with this program; if not, contact CiviCRM LLC |
+ | at info[AT]civicrm[DOT]org. If you have questions about the |
+ | GNU Affero General Public License or the licensing of CiviCRM, |
+ | see the CiviCRM license FAQ at http://civicrm.org/licensing |
+ +--------------------------------------------------------------------+
*/
+
+/**
+ * @package CiviCRM_APIv3
+ */
+
/**
* Generic api wrapper used for quicksearch and autocomplete.
*
<?php
+/*
+ +--------------------------------------------------------------------+
+ | CiviCRM version 4.6 |
+ +--------------------------------------------------------------------+
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+ +--------------------------------------------------------------------+
+ | This file is a part of CiviCRM. |
+ | |
+ | CiviCRM is free software; you can copy, modify, and distribute it |
+ | under the terms of the GNU Affero General Public License |
+ | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+ | |
+ | CiviCRM is distributed in the hope that it will be useful, but |
+ | WITHOUT ANY WARRANTY; without even the implied warranty of |
+ | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+ | See the GNU Affero General Public License for more details. |
+ | |
+ | You should have received a copy of the GNU Affero General Public |
+ | License and the CiviCRM Licensing Exception along |
+ | with this program; if not, contact CiviCRM LLC |
+ | at info[AT]civicrm[DOT]org. If you have questions about the |
+ | GNU Affero General Public License or the licensing of CiviCRM, |
+ | see the CiviCRM license FAQ at http://civicrm.org/licensing |
+ +--------------------------------------------------------------------+
+ */
+
+/**
+ * @package CiviCRM_APIv3
+ */
+
/**
* Set a single value using the api.
*
+--------------------------------------------------------------------+
*/
+/**
+ * @package CiviCRM_APIv3
+ */
+
/**
* Update function is basically a hack.
*
*/
/**
- * This api exposes CiviCRM grant.
+ * This api exposes CiviCRM grant records.
+ *
+ * @note Grant component must be enabled.
*
* @package CiviCRM_APIv3
- * @subpackage API_Grant
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_grant_create_spec(&$params) {
$params['grant_type_id']['api.required'] = 1;
}
/**
- * Delete an existing grant.
- *
- * This method is used to delete any existing grant. id of the grant
- * to be deleted is required field in $params array
+ * This method is used to delete an existing grant.
*
* @param array $params
- * Array per getfields metadata.
+ * Id of the grant to be deleted is required.
*
* @return array
* API Result Array
*/
/**
- * This api exposes CiviCRM group.
+ * This api exposes CiviCRM groups.
+ *
+ * This api is for creating/deleting groups or fetching a list of existing groups.
+ * To add/remove contacts to a group, use the groupContact api instead.
*
* @package CiviCRM_APIv3
- * @subpackage API_Group
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_group_create_spec(&$params) {
$params['is_active']['api.default'] = 1;
* Returns array of groups matching a set of one or more group properties.
*
* @param array $params
- * Array of one or more valid.
- * property_name=>value pairs. If $params is set
- * as null, all groups will be returned
+ * Array of properties. If empty, all records will be returned.
*
* @return array
* Array of matching groups
*/
/**
- * This api exposes CiviCRM group contact.
+ * This api exposes CiviCRM group contacts.
*
- * @package CiviCRM_APIv3
- * @subpackage API_Group
+ * This api is for adding/removing contacts from a group,
+ * or fetching a list of groups for a contact.
+ *
+ * Important note: This api does not fetch smart groups for a contact.
+ * To fetch all contacts in a smart group, use the contact api
+ * passing a contact_id and group_id.
+ *
+ * To create/delete groups, use the group api instead.
*
+ * @package CiviCRM_APIv3
*/
/**
* Add contact(s) to group(s).
*
- * @param array $params
- * Input parameters.
- *
- * Allowed @params array keys are:<br>
- * "contact_id" (required) : first contact to add<br>
- * "group_id" (required): first group to add contact(s) to<br>
- * "contact_id.1" etc. (optional) : another contact to add<br>
- * "group_id.1" etc. (optional) : additional group to add contact(s) to<br>
- * "status" (optional) : one of "Added", "Pending" or "Removed" (default is "Added")
- *
- * @return array
- * Information about operation results
- *
- * On success, the return array will be structured as follows:
- * <code>array(
+ * This api has a legacy/nonstandard signature.
+ * On success, the return array will be structured as follows:
+ * @code
+ * array(
* "is_error" => 0,
* "version" => 3,
* "count" => 3,
* "added" => integer,
* "total_count" => integer
* )
- * )</code>
+ * )
+ * @endcode
*
- * On failure, the return array will be structured as follows:
- * <code>array(
+ * On failure, the return array will be structured as follows:
+ * @code
+ * array(
* 'is_error' => 1,
* 'error_message' = string,
* 'error_data' = mixed or undefined
- * )</code>
- * {@getfields GroupContact_create}
+ * )
+ * @endcode
+ *
+ * @param array $params
+ * Input parameters.
+ * - "contact_id" (required) : first contact to add
+ * - "group_id" (required): first group to add contact(s) to
+ * - "contact_id.1" etc. (optional) : another contact to add
+ * - "group_id.1" etc. (optional) : additional group to add contact(s) to
+ * - "status" (optional) : one of "Added", "Pending" or "Removed" (default is "Added")
+ *
+ * @return array
+ * Information about operation results
*/
function civicrm_api3_group_contact_create($params) {
// Nonstandard bao - doesn't accept ID as a param, so convert id to group_id + contact_id
/**
* Group contact helper function.
*
+ * @todo behaviour is highly non-standard - need to figure out how to make this 'behave'
+ * & at the very least return IDs & details of the groups created / changed
+ *
* @param array $params
* @param string $op
*
* @return array
- * @todo behaviour is highly non-standard - need to figure out how to make this 'behave'
- * & at the very least return IDs & details of the groups created / changed
*/
function _civicrm_api3_group_contact_common($params, $op = 'Added') {
/**
* This api exposes CiviCRM group nesting.
*
- * @package CiviCRM_APIv3
- * @subpackage API_Group
+ * This defines parent/child relationships between nested groups.
*
+ * @package CiviCRM_APIv3
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_group_nesting_create_spec(&$params) {
$params['child_group_id']['api.required'] = 1;
* Removes specific nesting records.
*
* @param array $params
- * Parameters array - allowed array keys include:.
- * {@getfields GroupNesting_delete}
*
* @return array
* API Success or fail array
* This api exposes the relationships between organizations and CiviCRM groups.
*
* @package CiviCRM_APIv3
- * @subpackage API_Group
- *
*/
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_group_organization_create_spec(&$params) {
$params['organization_id']['api.required'] = 1;
* This api exposes CiviCRM IM.
*
* @package CiviCRM_APIv3
- * @subpackage API_IM
- *
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_im_create_spec(&$params) {
$params['contact_id']['api.required'] = 1;
* This api is used for triggering scheduled "cron" jobs.
*
* @package CiviCRM_APIv3
- * @subpackage API_Job
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_job_create_spec(&$params) {
$params['run_frequency']['api.required'] = 1;
* Adjust Metadata for Execute action.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_job_execute_spec(&$params) {
}
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_job_send_reminder(&$params) {
//@todo this function will now take all fields in action_schedule as params
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_job_update_greeting_spec(&$params) {
$params['ct'] = array(
* This api exposes CiviCRM line item.
*
* @package CiviCRM_APIv3
- * @subpackage API_LineItem
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_line_item_create_spec(&$params) {
$params['entity_id']['api.required'] = 1;
* to be deleted is required field in $params array
*
* @param array $params
- * Array containing id of the group.
- * to be deleted
+ * Array containing id of the group to be deleted.
*
* @return array
* API result array
* This api exposes CiviCRM loc_block.
*
* @package CiviCRM_APIv3
- * @subpackage API_LocBlock
*/
/**
* This api exposes CiviCRM location type.
*
* @package CiviCRM_APIv3
- * @subpackage API_LocationType
- *
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_location_type_create_spec(&$params) {
$params['is_active']['api.default'] = 1;
* This api exposes CiviCRM mail settings.
*
* @package CiviCRM_APIv3
- * @subpackage API_mail_settings
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_mail_settings_create_spec(&$params) {
* APIv3 functions for registering/processing mailing events.
*
* @package CiviCRM_APIv3
- * @subpackage API_Mailing
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_mailing_create_spec(&$params) {
$params['created_id']['api.required'] = 1;
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_mailing_event_bounce_spec(&$params) {
$params['job_id']['api.required'] = 1;
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_mailing_event_reply_spec(&$params) {
$params['job_id']['api.required'] = 1;
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_mailing_event_forward_spec(&$params) {
$params['job_id']['api.required'] = 1;
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_mailing_stats_spec(&$params) {
$params['date']['api.default'] = 'now';
* APIv3 functions for registering/processing mailing ab testing events.
*
* @package CiviCRM_APIv3
- * @subpackage API_MailingAB
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_mailing_a_b_submit_spec(&$params) {
$mailingFields = CRM_Mailing_DAO_Mailing::fields();
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_mailing_a_b_graph_stats_spec(&$params) {
$params['criteria']['title'] = 'Criteria';
* This api exposes CiviCRM mailing_component.
*
* @package CiviCRM_APIv3
- * @subpackage API_mailing_component
*/
/**
* This api exposes CiviCRM contact and mailing.
*
* @package CiviCRM_APIv3
- * @subpackage API_MailingContact
- *
*/
/**
* Adjust Metadata for Get action.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_mailing_contact_get_spec(&$params) {
$params['contact_id']['api.required'] = 1;
* APIv3 functions for registering/processing mailing group events.
*
* @package CiviCRM_APIv3
- * @subpackage API_MailerGroup
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_mailing_event_confirm_create_spec(&$params) {
$params['contact_id']['api.required'] = 1;
* APIv3 functions for registering/processing mailing group events.
*
* @package CiviCRM_APIv3
- * @subpackage API_MailerGroup
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_mailing_event_queue_create_spec(&$params) {
$params['job_id']['api.required'] = 1;
* APIv3 functions for registering/processing mailing group events.
*
* @package CiviCRM_APIv3
- * @subpackage API_MailerGroup
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_mailing_event_resubscribe_create_spec(&$params) {
$params['event_queue_id']['api.required'] = 1;
* APIv3 functions for registering/processing mailing group events.
*
* @package CiviCRM_APIv3
- * @subpackage API_MailerGroup
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_mailing_event_subscribe_create_spec(&$params) {
$params['email']['api.required'] = 1;
* APIv3 functions for registering/processing mailing group events.
*
* @package CiviCRM_APIv3
- * @subpackage API_MailerGroup
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_mailing_event_unsubscribe_create_spec(&$params) {
$params['job_id']['api.required'] = 1;
*
* @deprecated
* @package CiviCRM_APIv3
- * @subpackage API_MailerGroup
*/
/**
* APIv3 functions for registering/processing mailing jobs.
*
* @package CiviCRM_APIv3
- * @subpackage API_Mailing
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_mailing_job_create_spec(&$params) {
$params['status']['api.default'] = 'Scheduled';
* APIv3 functions for registering/processing mailing recipients.
*
* @package CiviCRM_APIv3
- * @subpackage API_Mailing
*/
* This api exposes CiviCRM membership contact.
*
* @package CiviCRM_APIv3
- * @subpackage API_Membership
- *
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_membership_create_spec(&$params) {
$params['contact_id']['api.required'] = 1;
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_membership_get_spec(&$params) {
$params['membership_type_id']['api.aliases'] = array('membership_type');
* This api exposes CiviCRM membership block.
*
* @package CiviCRM_APIv3
- * @subpackage API_Membership
- *
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_membership_block_create_spec(&$params) {
$params['is_active']['api.default'] = TRUE;
* This api exposes CiviCRM membership contribution link.
*
* @package CiviCRM_APIv3
- * @subpackage API_Membership
* @todo delete function doesn't exist
*/
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_membership_payment_create_spec(&$params) {
$params['membership_id']['api.required'] = 1;
* This api exposes CiviCRM membership status.
*
* @package CiviCRM_APIv3
- * @subpackage API_Membership
- *
*/
/**
*
* @return array
* Array of all found membership status property values.
- * {@getfields MembershipStatus_get}
*/
function civicrm_api3_membership_status_get($params) {
return _civicrm_api3_basic_get('CRM_Member_BAO_MembershipStatus', $params);
* Update an existing membership status.
*
* This api is used for updating an existing membership status.
- * Required parameters : id of a membership status
+ * Required parameters: id of a membership status
*
* @param array $params
* Array of name/value property values of civicrm_membership_status.
* This api exposes CiviCRM membership type.
*
* @package CiviCRM_APIv3
- * @subpackage API_Membership
- *
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_membership_type_create_spec(&$params) {
// todo could set default here probably
/**
* This api exposes CiviCRM message_template.
*
- * @package CiviCRM_SEPA
+ * @package CiviCRM_APIv3
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_message_template_create_spec(&$params) {
$params['msg_title']['api.required'] = 1;
* validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_message_template_send_spec(&$params) {
$params['messageTemplateID']['api.required'] = 1;
* This api exposes CiviCRM note.
*
* @package CiviCRM_APIv3
- * @subpackage API_Note
- *
*/
/**
*
* @param array $params
* An associative array of name/value property values of civicrm_note.
- * {@getfields note_create}
*
* @return array
* API result array
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_note_create_spec(&$params) {
$params['entity_table']['api.default'] = "civicrm_contact";
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_note_get_spec(&$params) {
$params['entity_table']['api.default'] = "civicrm_contact";
* Each group contains option values.
*
* @package CiviCRM_APIv3
- * @subpackage API_OptionValue
- *
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_option_group_create_spec(&$params) {
$params['name']['api.unique'] = 1;
* Values are grouped by "OptionGroup"
*
* @package CiviCRM_APIv3
- * @subpackage API_OptionValue
- *
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_option_value_create_spec(&$params) {
$params['is_active']['api.default'] = 1;
* This api exposes CiviCRM participant.
*
* @package CiviCRM_APIv3
- * @subpackage API_Participant
- *
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_participant_create_spec(&$params) {
$params['status_id']['api.default'] = "1";
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_participant_get_spec(&$params) {
$params['participant_test']['api.default'] = 0;
* This api exposes CiviCRM participant payments.
*
* @package CiviCRM_APIv3
- * @subpackage API_Participant
- *
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_participant_payment_create_spec(&$params) {
$params['participant_id']['api.required'] = 1;
* This api exposes CiviCRM participant status options.
*
* @package CiviCRM_APIv3
- * @subpackage API_Event
*/
/**
* Returns array of participant_statuses matching a set of one or more group properties.
*
* @param array $params
- * Array of one or more valid.
- * property_name=>value pairs. If $params is set
- * as null, all participant_statuses will be returned
+ * Array of properties. If empty, all records will be returned.
*
* @return array
* Array of matching participant_statuses
* This api exposes CiviCRM PaymentProcessor.
*
* @package CiviCRM_APIv3
- * @subpackage API_PaymentProcessor
- *
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_payment_processor_create_spec(&$params) {
$params['payment_processor_type_id']['api.required'] = 1;
* This api exposes CiviCRM payment processor types.
*
* @package CiviCRM_APIv3
- * @subpackage API_Contact
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_payment_processor_type_create_spec(&$params) {
$params['billing_mode']['api.required'] = 1;
* This api exposes CiviCRM phone.
*
* @package CiviCRM_APIv3
- * @subpackage API_Phone
- *
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_phone_create_spec(&$params) {
$params['contact_id']['api.required'] = 1;
* civicrm_api('Phone','Get') to retrieve one or more phones is implemented by
* function civicrm_api3_phone_get ($params) into the file Phone/Get.php
* Could have been implemented here in this file too, but we moved it to illustrate the feature with a real usage.
- *
*/
<?php
+/*
+ +--------------------------------------------------------------------+
+ | CiviCRM version 4.6 |
+ +--------------------------------------------------------------------+
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+ +--------------------------------------------------------------------+
+ | This file is a part of CiviCRM. |
+ | |
+ | CiviCRM is free software; you can copy, modify, and distribute it |
+ | under the terms of the GNU Affero General Public License |
+ | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+ | |
+ | CiviCRM is distributed in the hope that it will be useful, but |
+ | WITHOUT ANY WARRANTY; without even the implied warranty of |
+ | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+ | See the GNU Affero General Public License for more details. |
+ | |
+ | You should have received a copy of the GNU Affero General Public |
+ | License and the CiviCRM Licensing Exception along |
+ | with this program; if not, contact CiviCRM LLC |
+ | at info[AT]civicrm[DOT]org. If you have questions about the |
+ | GNU Affero General Public License or the licensing of CiviCRM, |
+ | see the CiviCRM license FAQ at http://civicrm.org/licensing |
+ +--------------------------------------------------------------------+
+ */
+
+/**
+ * @package CiviCRM_APIv3
+ */
/**
* Retrieve one or more phones.
* This api exposes CiviCRM Pledge.
*
* @package CiviCRM_APIv3
- * @subpackage API_Pledge
- *
*/
/**
*
* @return array
* array of pledges, if error an array with an error id and error message
- * {@getfields pledge_get}
- * @example PledgeGet.php
*/
function civicrm_api3_pledge_get($params) {
$mode = CRM_Contact_BAO_Query::MODE_PLEDGE;
* This api exposes CiviCRM Pledge payment.
*
* @package CiviCRM_APIv3
- * @subpackage API_Pledge_Payment
- *
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_pledge_payment_create_spec(&$params) {
$params['pledge_id']['api.required'] = 1;
* This api exposes CiviCRM premium.
*
* @package CiviCRM_APIv3
- * @subpackage API_premium
*/
/**
* This api exposes CiviCRM price set fields.
*
* @package CiviCRM_APIv3
- * @subpackage API_PriceField
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_price_field_create_spec(&$params) {
$params['label']['api.required'] = TRUE;
* to be deleted is required field in $params array
*
* @param array $params
- * Array containing id of the group.
- * to be deleted
+ * Array containing id of the group to be deleted.
*
* @return array
* API result array
* This api exposes CiviCRM price sets.
*
* @package CiviCRM_APIv3
- * @subpackage API_PriceFieldValue
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_price_field_value_create_spec(&$params) {
$params['price_field_id']['api.required'] = TRUE;
* to be deleted is required field in $params array
*
* @param array $params
- * Array containing id of the group.
- * to be deleted
+ * Array containing id of the group to be deleted.
*
* @return array
* API result array.
* This api exposes CiviCRM price sets.
*
* @package CiviCRM_APIv3
- * @subpackage API_PriceSet
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_price_set_create_spec(&$params) {
$params['title']['api.required'] = TRUE;
* to be deleted is required field in $params array
*
* @param array $params
- * Array containing id of the group.
- * to be deleted
+ * Array containing id of the group to be deleted.
*
* @return array
* API result array
* This api exposes CiviCRM print_label.
*
* @package CiviCRM_APIv3
- * @subpackage API_print_label
*/
/**
* This api exposes CiviCRM product.
*
* @package CiviCRM_APIv3
- * @subpackage API_product
*/
/**
* This api exposes CiviCRM activity profile.
*
* @package CiviCRM_APIv3
- * @subpackage API_ActivityProfile
*/
/**
* This api exposes CiviCRM relationships.
*
* @package CiviCRM_APIv3
- * @subpackage API_Relationship
- *
*/
/**
* Adjust Metadata for Create action.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_relationship_create_spec(&$params) {
$params['contact_id_a']['api.required'] = 1;
* This api exposes CiviCRM relationship types.
*
* @package CiviCRM_APIv3
- * @subpackage API_Contact
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_relationship_type_create_spec(&$params) {
$params['contact_type_a']['api.required'] = 1;
/**
* This api exposes CiviCRM report instances.
*
- * @package CiviCRM_APIv3_Core
- * @subpackage API_Report
+ * @package CiviCRM_APIv3
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_report_instance_create_spec(&$params) {
$params['report_id']['api.required'] = 1;
/**
* This api exposes CiviCRM report templates.
*
- * @package CiviCRM_APIv3_Core
- * @subpackage API_Report
+ * @package CiviCRM_APIv3
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_report_template_create_spec(&$params) {
require_once 'api/v3/OptionValue.php';
/**
* This api exposes CiviCRM configuration settings.
*
- * @package CiviCRM_APIv3_Core
- * @subpackage API_Settings
+ * @package CiviCRM_APIv3
*/
/**
*/
/**
- * This api exposes CiviCRM sms_provider.
+ * This api exposes CiviCRM sms_provider records.
*
* @package CiviCRM_APIv3
- * @subpackage API_sms_provider
*/
/**
*/
/**
- * This api exposes CiviCRM survey.
+ * This api exposes CiviCRM survey/petition records.
+ *
+ * @note Campaign component must be enabled.
+ * @note There is no "petition" api.
+ * Surveys and petitions are the same basic object and this api is used for both.
*
* @package CiviCRM_APIv3
- * @subpackage API_Survey
*/
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_survey_create_spec(&$params) {
$params['title']['api.required'] = 1;
* Returns array of surveys matching a set of one or more group properties.
*
* @param array $params
- * Array of one or more valid.
- * property_name=>value pairs. If $params is set
- * as null, all surveys will be returned
+ * Array of properties. If empty, all records will be returned.
*
* @return array
* API result Array of matching surveys
/**
* This api exposes CiviCRM Survey Respondant.
*
+ * @deprecated - api currently not supported
+ *
* @package CiviCRM_APIv3
- * @subpackage API_Survey
*/
/**
*/
/**
- * This api exposes CiviCRM system.
+ * This api exposes CiviCRM system functionality.
*
- * @package CiviCRM_APIv3
- * @subpackage API_Domain
+ * Includes caching, logging, and checking system functionality.
*
+ * @package CiviCRM_APIv3
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_system_flush_spec(&$params) {
$params['triggers'] = array('title' => 'rebuild triggers (boolean)');
}
/**
- * System.Check API.
+ * System Check API.
*
* @param array $params
*
* This api exposes CiviCRM SystemLog.
*
* @package CiviCRM_APIv3
- * @subpackage API_SystemLog
- *
*/
/**
*/
/**
- * This api exposes CiviCRM tag.
+ * This api exposes CiviCRM tags.
*
- * @package CiviCRM_APIv3
- * @subpackage API_Tag
+ * Tags are used to classify CRM entities (including Contacts, Groups and Actions).
*
+ * @note this api is for working with tags themselves. To add/remove tags from
+ * a contact or other entity, use the EntityTag api.
+ *
+ * @package CiviCRM_APIv3
*/
/**
- * Add a Tag.
+ * Create or update a tag.
*
* Tags are used to classify CRM entities (including Contacts, Groups and Actions).
*
* This api exposes CiviCRM profile field.
*
* @package CiviCRM_APIv3
- * @subpackage API_UF
- *
*/
/**
* This api exposes CiviCRM profile group.
*
* @package CiviCRM_APIv3
- * @subpackage API_UF
- *
*/
/**
* Returns array of uf groups (profiles) matching a set of one or more group properties.
*
* @param array $params
- * Array of one or more valid.
- * property_name=>value pairs. If $params is set
- * as null, all surveys will be returned
+ * Array of properties. If empty, all records will be returned.
*
* @return array
* Array of matching profiles
* This api exposes CiviCRM user framework join.
*
* @package CiviCRM_APIv3
- * @subpackage API_UF
- *
*/
/**
* Adjust Metadata for Create action.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*
* @todo - suspect module, weight don't need to be required - need to test
*/
* This api exposes CiviCRM user framework match.
*
* @package CiviCRM_APIv3
- * @subpackage API_UF
- *
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_uf_match_create_spec(&$params) {
$params['contact_id']['api.required'] = 1;
*/
/**
- * This api exposes CiviCRM website.
+ * This api exposes CiviCRM website records.
*
* @package CiviCRM_APIv3
- * @subpackage API_Website
- *
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_website_create_spec(&$params) {
$params['contact_id']['api.required'] = 1;
/**
* This api exposes CiviCRM word replacement.
*
- * @package CiviCRM_APIv3
- * @subpackage API_WordReplacement
+ * Word-replacements are used to globally alter strings in the CiviCRM UI.
+ * Note that the original source string is always English, regardless of language settings.
*
+ * @package CiviCRM_APIv3
*/
/**
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_word_replacement_create_spec(&$params) {
unset($params['version']);
*/
/**
- * File for CiviCRM APIv3 utilitity functions
+ * CiviCRM APIv3 utility functions.
*
* @package CiviCRM_APIv3
- * @subpackage API_utils
- *
*/
/**
* Replace the old set of entities (matching some given keys) with a new set of
* entities (matching the same keys).
*
- * Note: This will verify that 'values' is present, but it does not directly verify
+ * @note This will verify that 'values' is present, but it does not directly verify
* any other parameters.
*
* @param string $entity