private $extraParams = array();
/**
+ * Class constructor.
+ *
* @param string $message
* The human friendly error message.
* @param mixed $error_code
*/
/**
- * Add an Address for a contact
- *
- * Allowed @params array keys are:
- * {@getfields address_create}
- * {@example AddressCreate.php}
+ * Add an Address for a contact.
*
* @param array $params
+ * Array per getfields metadata.
*
* @return array
* Array of newly created tag property values.
);
}
/**
- * Adjust Metadata for Get action
+ * Adjust Metadata for Get action.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_address_get_spec(&$params) {
$params['world_region'] = array(
}
/**
- * Deletes an existing Address
+ * Delete an existing Address.
*
* @param array $params
- *
- * {@getfields address_delete}
- * {@example AddressDelete.php 0}
+ * Array per getfields metadata.
*
* @return array
* api result array
}
/**
- * Retrieve one or more addresses on address_id, contact_id, street_name, city
- * or a combination of those
+ * Retrieve one or more addresses.
*
* @param array $params
- * An associative array of name/value pairs.
+ * Array per getfields metadata.
*
* @return array
* details of found addresses else error
* be in $params array.
*
* @param array $params
- * (reference) Associative array of property.
- * name/value pairs to insert in new 'contact_type'
+ * Array per getfields metadata.
*
* @return array
* contact_type array
*/
/**
- * 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
+ * Array per getfields metadata.
*
* @return array
* api result array
- * {@getfields contribution_page_create}
*/
function civicrm_api3_contribution_page_create($params) {
$result = _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params);
* The metadata is used for setting defaults, documentation & validation.
*
* @param array $params
- * Array or parameters determined by getfields.
+ * Array per getfields metadata.
*/
function _civicrm_api3_contribution_page_create_spec(&$params) {
$params['financial_type_id']['api.required'] = 1;
}
/**
- * 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.
+ * Array per getfields metadata.
*
* @return array
* API Result array Array of matching contribution_pages
- * {@getfields contribution_page_get}
*/
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
- * Array containing id of the group.
- * to be deleted
+ * Array per getfields metadata.
*
* @return array
* API result Array
- * {@getfields contribution_page_delete}
*/
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
+ * Array per getfields metadata.
*
* @return array
* API result array
- * {@getfields contribution_page_delete}
*/
function civicrm_api3_contribution_page_submit($params) {
$result = CRM_Contribute_Form_Contribution_Confirm::submit($params);
*/
/**
- * Create or update a contribution_recur
+ * Create or update a contribution_recur.
*
* @param array $params
- * Associative array of property.
- * name/value pairs to insert in new 'contribution_recur'
- * @example ContributionRecurCreate.php Std Create example
+ * Array per getfields metadata.
*
* @return array
* api result array
* @param array $params
*/
function civicrm_api3_contribution_soft_delete($params) {
- // non standard BAO - we have to write custom code to cope
+ // Non standard BAO - we have to write custom code to cope.
CRM_Contribute_BAO_ContributionSoft::del(array('id' => $params['id']));
}
/**
* Retrieve one or more Soft Credits.
*
- * @example ContributionSoftGet.php Standard Get Example
- *
- * @param array $params An associative array of name/value pairs.
+ * @param array $params
+ * Array per getfields metadata.
*
- * @return array api result {@getfields contribution_soft_get}
+ * @return array
+ * API result
*/
function civicrm_api3_contribution_soft_get($params) {
return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
* @version $Id: Country.php 2011-02-16 ErikHommel $
*/
-require_once 'CRM/Core/DAO/Country.php';
-
/**
- * Add an Country for a contact
- *
- * Allowed @params array keys are:
- *
- * @example CountryCreate.php Standard Create Example
+ * Add an Country for a contact.
*
* @param array $params
+ * Array per getfields metadata.
+ *
* @return array
* API result array
* @throws \API_Exception
}
/**
- * Deletes an existing Country
+ * Deletes an existing Country.
*
* @param array $params
*
- * @example CountryDelete.php Standard Delete Example
- *
- * @return bool
- * | error true if successfull, error otherwise
- * {@getfields country_delete}
+ * @return array
*/
function civicrm_api3_country_delete($params) {
return _civicrm_api3_basic_delete(_civicrm_api3_get_DAO(__FUNCTION__), $params);
}
/**
- * Retrieve one or more countrys
- *
- * @example CountryGet.php Standard Get Example
+ * Retrieve one or more countryies.
*
* @param array $params
- * An associative array of name/value pairs.
+ * Array per getfields metadata.
*
* @return array
* api result array
- * {@getfields country_get}
*/
function civicrm_api3_country_get($params) {
/**
* Create a 'custom field' within a custom field group.
+ *
* We also empty the static var in the getfields
* function after deletion so that the field is available for us (getfields manages date conversion
* among other things
*
* @param array $params
- * Array Associative array of property name/value pairs to create new custom field.
+ * Array per getfields metadata.
*
* @return array
* API success array
*/
function civicrm_api3_custom_field_create($params) {
- // Array created for passing options in params
+ // Array created for passing options in params.
if (isset($params['option_values']) && is_array($params['option_values'])) {
foreach ($params['option_values'] as $key => $value) {
$params['option_label'][$key] = $value['label'];
}
/**
- * Flush static caches in functions that might have stored available custom fields
+ * Flush static caches in functions that might have stored available custom fields.
*/
function _civicrm_api3_custom_field_flush_static_caches() {
civicrm_api('custom_field', 'getfields', array('version' => 3, 'cache_clear' => 1));
}
/**
- * Helper function to validate custom field value
+ * Helper function to validate custom field value.
+ *
* @deprecated
*
* @param string $fieldName
}
/**
- * CRM-15191 - Hack to ensure the cache gets cleared after updating a custom field
+ * CRM-15191 - Hack to ensure the cache gets cleared after updating a custom field.
+ *
* @param array $params
+ * Array per getfields metadata.
+ *
* @return array
*/
function civicrm_api3_custom_field_setvalue($params) {
* @version $Id: CustomGroup.php 30879 2010-11-22 15:45:55Z shot $
*/
-/**
- * Most API functions take in associative arrays ( name => value pairs
- * as parameters. Some of the most commonly used parameters are
- * described below
- *
- * @param array $params
- * An associative array used in construction.
- * retrieval of the object
- * @todo missing get function
- */
-
/**
* Use this API to create a new group.
*
* $params['class_name'] is a required field, class being extended.
*
* @param array $params
- * Array of property name/value pairs to insert in group.
+ * Array per getfields metadata.
*
* @return array
* @todo $params['extends'] is array format - is that std compatible
}
/**
- * Use this API to get existing custom fields.
+ * API to get existing custom fields.
*
* @param array $params
- * Array to search on.
+ * Array per getfields metadata.
*
* @return array
*/
* CRM-15191 - Hack to ensure the cache gets cleared after updating a custom group.
*
* @param array $params
+ * Array per getfields metadata.
*
* @return array
*/
}
/**
- * Gets a CiviCRM Dashlets of Contacts according to parameters
+ * Gets a CiviCRM Dashlets of Contacts according to parameters.
*
* @param array $params
- * Associative array of property name/value.
- * pairs for the activity.
+ * Array per getfields metadata.
*
* @return array
- *
*/
function civicrm_api3_dashboard_contact_get($params) {
return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
/**
+ * Check permissions on contact dashboard retrieval.
+ *
* @param array $params
+ * Array per getfields metadata.
*
* @return array|null
*/
*/
/**
- * Add an Email for a contact
- *
- * Allowed @params array keys are:
- *
- * @example EmailCreate.php Standard Create Example
+ * Add an Email for a contact.
*
* @param array $params
+ * Array per getfields metadata.
*
* @return array
* API result array
}
/**
- * Deletes an existing Email
+ * Deletes an existing Email.
*
* @param array $params
+ * Array per getfields metadata.
*
- * @example EmailDelete.php Standard Delete Example
- *
- * @return bool
- * | error true if successfull, error otherwise
+ * @return array
+ * API result array.
*/
function civicrm_api3_email_delete($params) {
return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
/**
- * Retrieve one or more emails
+ * Retrieve one or more emails.
*
* @param array $params
- * An associative array of name/value pairs.
+ * Array per getfields metadata.
*
* @return array
* api result array
/**
* Create a file.
*
- * This API is used for creating a file
- *
* @param array $params
- * An associative array of name/value property values of civicrm_file.
+ * Array per getfields metadata.
*
* @return array
* Array of newly created file property values.
/**
* Get a file.
*
- * This api is used for finding an existing file.
- * Required parameters : id OR file_type_id of a file
- *
* @param array $params
- * An associative array of name/value property values of civicrm_file.
+ * Array per getfields metadata.
*
* @return array
* Array of all found file object property values.
/**
* Update an existing file.
*
- * This api is used for updating an existing file.
- *
* @param array $params
+ * Array per getfields metadata.
*
* @return array
*/
/**
* Delete an existing file.
*
- * This API is used for deleting a file
- *
* @param array $params
+ * Array per getfields metadata.
*
* @return array
* API result array
*/
/**
- * create/update grant
- *
- * This API is used to create new grant or update any of the existing
- * In case of updating existing grant, id of that particular grant must
- * be in $params array.
+ * Create/update grant.
*
* @param array $params
- * Associative array of property.
- * name/value pairs to insert in new 'grant'
+ * Array per getfields metadata.
*
* @return array
* grant array
- * {@getfields grant_create}
*/
function civicrm_api3_grant_create($params) {
return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params, 'Grant');
}
/**
- * Returns array of grants matching a set of one or more group properties
+ * Returns array of grants 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 grants will be returned
+ * Array per getfields metadata.
*
* @return array
* Array of matching grants
- * {@getfields grant_get}
*/
function civicrm_api3_grant_get($params) {
return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params, TRUE, 'Grant');
}
/**
- * delete an existing grant
+ * Delete an existing grant.
*
* This method is used to delete any existing grant. id of the group
* to be deleted is required field in $params array
*
* @param array $params
- * Array containing id of the group.
- * to be deleted
+ * Array per getfields metadata.
*
* @return array
* API Result Array
- * {@getfields grant_delete}
*/
function civicrm_api3_grant_delete($params) {
return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
* @subpackage API_MailerGroup
* @copyright CiviCRM LLC (c) 2004-2014
* $Id$
- *
*/
/**
- * Handle a confirm event
+ * Handle a confirm event.
*
* @param array $params
- * Associative array of property.
+ * Array of property.
*
* @throws Exception
* @return array
}
/**
+ * Get mailing event queue record.
+ *
* @param array $params
* @return array
*/
}
/**
+ * Delete mailing event queue record.
+ *
* @param array $params
+ *
* @return array
* @throws \API_Exception
*/
* your module under api/v3/Phone/Dial.php.
*
* @param array $params
- * An associative array of name/value pairs.
+ * Array per getfields metadata.
*
* @return array
* details of found phones else error
*/
/**
- * Create or update a price_field
+ * Create or update a price_field.
*
* @param array $params
* Associative array of property.
* name/value pairs to insert in new 'price_field'
- * @example PriceFieldCreate.php Std Create example
*
* @return array
* api result array
- * {@getfields price_field_create}
*/
function civicrm_api3_price_field_create($params) {
return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
/**
- * Returns array of price_fields matching a set of one or more group properties
+ * Returns array of price_fields 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.
*
* @return array
* Array of matching price_fields
- * {@getfields price_field_get}
*/
function civicrm_api3_price_field_get($params) {
return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
/**
- * delete an existing price_field
+ * Delete an existing price_field.
*
* This method is used to delete any existing price_field. id of the group
* to be deleted is required field in $params array
*
* @return array
* API result array
- * {@getfields price_field_delete}
*/
function civicrm_api3_price_field_delete($params) {
return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
* Create relationship type.
*
* @param array $params
- * Associative array of property name/value pairs to insert in new relationship type.
+ * Array per getfields metadata.
*
* @return array
*/
*
* @package CiviCRM_APIv3
* @subpackage API_sms_provider
- *
*/
/**
- * Save an sms_provider
- *
- * Allowed @params array keys are:
- * {@getfields sms_provider_create}
- * @example sms_providerCreate.php
+ * Save an sms_provider.
*
* @param array $params
*
}
/**
- * Get an sms_provider
- *
- * Allowed @params array keys are:
- * {@getfields sms_provider_get}
- * @example sms_providerCreate.php
+ * Get an sms_provider.
*
* @param array $params
*
}
/**
- * Delete an sms_provider
- *
- * Allowed @params array keys are:
- * {@getfields sms_provider_delete}
- * @example sms_providerCreate.php
+ * Delete an sms_provider.
*
* @param array $params
*
/**
- * Create or update a survey
+ * Create or update a survey.
*
* @param array $params
- * Associative array of property.
- * name/value pairs to insert in new 'survey'
- * @example SurveyCreate.php Std Create example
+ * Array per getfields metadata.
*
* @return array
* api result array
- * {@getfields survey_create}
*/
function civicrm_api3_survey_create($params) {
return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params, 'Survey');
}
/**
- * Returns array of surveys matching a set of one or more group properties
+ * Returns array of surveys matching a set of one or more group properties.
*
* @param array $params
* Array of one or more valid.
*
* @return array
* API result Array of matching surveys
- * {@getfields survey_get}
*/
function civicrm_api3_survey_get($params) {
return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params, TRUE, 'Survey');
}
/**
- * delete an existing survey
+ * Delete an existing survey.
*
* This method is used to delete any existing survey. id of the group
* to be deleted is required field in $params array
*
* @return array
* api result array
- * {@getfields survey_delete}
*/
function civicrm_api3_survey_delete($params) {
return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
*
* Tags are used to classify CRM entities (including Contacts, Groups and Actions).
*
- * Allowed @params array keys are:
- *
- * {@example TagCreate.php}
- *
* @param array $params
+ * Array per getfields metadata.
*
* @return array
- * Array of newly created tag property values.
- * {@getfields tag_create}
*/
function civicrm_api3_tag_create($params) {
return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params);
* This api is used for finding an existing tag.
* Either id or name of tag are required parameters for this api.
*
- * @example TagGet.php
- *
* @param array $params
- * An associative array of name/value pairs.
+ * Array per getfields metadata.
*
* @return array
* details of found tags else error
- * {@getfields tag_get}
*/
function civicrm_api3_tag_get($params) {
* Defines 'uf field' within a group.
*
* @param array $params
- * Array Associative array of property name/value pairs to create new uf field.
+ * Array per getfields metadata.
*
* @throws API_Exception
*
* See the CRM Data Model for uf_group property definitions
*
* @param array $params
- * Array Associative array of property name/value pairs to insert in group.
+ * Array per getfields metadata.
*
* @return array
* API result array
* Takes an associative array and creates a uf join in the database.
*
* @param array $params
- * Assoc array of name/value pairs.
+ * Array per getfields metadata.
*
* @return array
* CRM_Core_DAO_UFJoin Array