}
/**
- * custom string representation of object
+ * Custom string representation of object.
+ *
* @return string
*/
public function __toString() {
}
/**
- * custom string representation of object
+ * Custom string representation of object.
+ *
* @return string
*/
public function __toString() {
}
/**
+ * Get error code.
+ *
* @return mixed
*/
public function getErrorCode() {
}
/**
+ * Get camel case version of entity or action name.
+ *
* @param $entity
*
* @return string
}
/**
- * Swap out any $values vars - ie. the value after $value is swapped for the parent $result
+ * Swap out any $values vars.
+ *
+ * Ie. the value after $value is swapped for the parent $result
* 'activity_type_id' => '$value.testfield',
* 'tag_id' => '$value.api.tag.create.id',
* 'tag1_id' => '$value.api.entity.create.0.id'
*
* @param array $params
* Array including id of activity_type to delete.
-
+ *
* @return array
* API result array
*
*/
/**
- * Add an Address for a contact.
+ * Add an Address for a contact.
*
* @param array $params
* Array per getfields metadata.
*/
/**
- * Adjust metadata for "create" action
+ * Adjust metadata for "create" action.
*
* @param array $spec
* List of fields.
}
/**
- * Create an attachment
+ * Create an attachment.
*
* @param array $params
+ *
* @return array
* Array of newly created file property values.
* @throws API_Exception validation errors
}
/**
- * Adjust metadata for "create" action
+ * Adjust metadata for get action.
*
* @param array $spec
* List of fields.
}
/**
+ * Adjust metadata for attachment delete action.
+ *
* @param $spec
*/
function _civicrm_api3_attachment_delete_spec(&$spec) {
}
/**
+ * Delete attachment.
+ *
* @param array $params
+ *
* @return array
* @throws API_Exception
*/
}
/**
+ * Attachment find helper.
+ *
* @param array $params
* @param int|null $id the user-supplied ID of the attachment record
* @param array $file
* @param array $entityFile
* The user-supplied values of the entity-file (entity_table, entity_id).
* @param bool $isTrusted
+ *
* @return CRM_Core_DAO
* @throws API_Exception
*/
if ($id) {
$select->where('cf.id = #id', array('#id' => $id));
}
- // recall: $file is filtered by parse_params
+ // Recall: $file is filtered by parse_params.
foreach ($file as $key => $value) {
$select->where('cf.!field = @value', array(
'!field' => $key,
'@value' => $value,
));
}
- // recall: $entityFile is filtered by parse_params
+ // Recall: $entityFile is filtered by parse_params.
foreach ($entityFile as $key => $value) {
$select->where('cef.!field = @value', array(
'!field' => $key,
}
/**
+ * Attachment parsing helper.
+ *
* @param array $params
+ *
* @return array (0 => int $id, 1 => array $file, 2 => array $entityFile, 3 => string $name, 4 => string $content,
* 5 => string $moveFile, 6 => $isTrusted, 7 => bool $returnContent)
* - array $file: whitelisted fields that can pass through directly to civicrm_file
}
/**
+ * Attachment result formatting helper.
+ *
* @param CRM_Core_DAO_File $fileDao
* Maybe "File" or "File JOIN EntityFile".
* @param CRM_Core_DAO_EntityFile $entityFileDao
}
/**
+ * Attachment getfields helper.
+ *
* @return array
* list of fields (indexed by name)
*/
* <li>worldRegion</li>
* <li>wysiwygEditor</li>
* </ul>
+ *
* @return array
- * @example ConstantGet.php
- * {@getfields constant_get}
*/
function civicrm_api3_constant_get($params) {
*
* @return array
* API Result Array
- *
*/
function civicrm_api3_contact_create($params) {
* Array per getfields metadata.
*
* @throws API_Exception
- *
*/
function _civicrm_api3_greeting_format_params($params) {
$greetingParams = array('', '_id', '_custom');
}
$formatParams = FALSE;
- // unset display value from params.
+ // Unset display value from params.
if (isset($params["{$key}{$greeting}_display"])) {
unset($params["{$key}{$greeting}_display"]);
}
/**
+ * Get parameters for getlist function.
+ *
* @see _civicrm_api3_generic_getlist_params
*
* @param array $request
}
/**
+ * Get output for getlist function.
+ *
* @see _civicrm_api3_generic_getlist_output
*
* @param array $result
}
/**
- * Specify Meta data for create. Note that this data is retrievable via the getfields function
+ * Specify Meta data for create.
+ *
+ * Note that this data is retrievable via the getfields function
* and is used for pre-filling defaults and ensuring mandatory requirements are met.
+ *
* @param array $params
- * (reference) array of parameters determined by getfields.
+ * array of parameters determined by getfields.
*/
function _civicrm_api3_dashboard_create_spec(&$params) {
unset($params['version']);
}
/**
- * Uninstall an extension
+ * Uninstall an extension,
*
* @param array $params
* Input parameters.
*/
/**
- * create/update group
- *
- * This API is used to create new group or update any of the existing
- * In case of updating existing group, id of that particular group must
- * be in $params array. Either id or name is required field in the
- * $params array
+ * Create/update group.
*
* @param array $params
* Associative array of property.
*
* @return array
* API result array
- * @example GroupCreate.php
- * {@getfields group_create}
*/
function civicrm_api3_group_create($params) {
return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params, 'Group');
}
/**
- * Returns array of groups matching a set of one or more group properties
+ * Returns array of groups matching a set of one or more group properties.
*
* @param array $params
* Array of one or more valid.
*
* @return array
* Array of matching groups
- * @example GroupGet.php
- * {@getfields group_get}
*/
function civicrm_api3_group_get($params) {
$options = _civicrm_api3_get_options_from_params($params, TRUE, 'group', 'get');
}
/**
- * delete an existing group
- *
- * This method is used to delete any existing group. id of the group
- * to be deleted is required field in $params array
+ * Delete an existing group.
*
* @param array $params
* Array containing id of the group.
*
* @return array
* API result array
- * @example GroupDelete.php
- * {@getfields group_delete}
- *
*/
function civicrm_api3_group_delete($params) {
*
* @copyright CiviCRM LLC (c) 2004-2014
* @version $Id: GroupContact.php 30171 2010-10-14 09:11:27Z mover $
- *
*/
/**
- * This API will give list of the groups for particular contact
- * Particular status can be sent in params array
+ * This API will give list of the groups for particular contact.
+ *
+ * Particular status can be sent in params array.
+ *
* If no status mentioned in params, by default 'added' will be used
* to fetch the records
*
* @param array $params
* Name value pair of contact information.
- * {@getfields GroupContact_get}
*
* @return array
* list of groups, given contact subsribed to
}
/**
- * Add contact(s) to group(s)
+ * Add contact(s) to group(s).
+ *
* @param array $params
* Input parameters.
*
* "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")
- * {@example GroupContactCreate.php 0}
*
* @return array
* Information about operation results
}
/**
+ * Delete group contact record.
*
* @param array $params
*
* @return array
- * <type>
+ *
* @deprecated
*/
function civicrm_api3_group_contact_delete($params) {
/**
* Creates group nesting record for given parent and child id.
+ *
* Parent and child groups need to exist.
*
* @param array $params
/**
- * File for the CiviCRM APIv3 group functions
+ * File for the CiviCRM APIv3 line item functions
*
* @package CiviCRM_APIv3
* @subpackage API_LineItem
*/
/**
- * Create or update a line_item
+ * Create or update a line_item.
*
* @param array $params
* Associative array of property.
}
/**
- * delete an existing line_item
+ * Delete an existing line_item.
*
* This method is used to delete any existing line_item. id of the group
* to be deleted is required field in $params array
* Handle a create event.
*
* @param array $params
+ *
* @return array API Success Array
* API Success Array
* @throws \API_Exception
}
/**
+ * Get mailing token.
+ *
* @param array $params
+ *
* @return array
* @throws \API_Exception
*/
}
/**
+ * Adjust metadata for mailing submit api function.
+ *
* @param array $spec
*/
function _civicrm_api3_mailing_submit_spec(&$spec) {
}
/**
+ * Mailing submit.
+ *
* @param array $params
+ *
* @return array
* @throws API_Exception
*/
}
/**
- * Adjust Metadata for bounce_spec action
+ * Adjust Metadata for bounce_spec action.
*
* The metadata is used for setting defaults, documentation & validation.
*
}
/**
- * Handle a confirm event
+ * Handle a confirm event.
+ *
* @deprecated
*
* @param array $params
}
/**
- * Handle a reply event
+ * Handle a reply event.
*
* @param array $params
*
}
/**
- * Adjust Metadata for event_reply action
+ * Adjust Metadata for event_reply action.
*
* The metadata is used for setting defaults, documentation & validation.
*
}
/**
- * Handle a forward event
+ * Handle a forward event.
*
* @param array $params
*
}
/**
- * Adjust Metadata for event_forward action
+ * Adjust Metadata for event_forward action.
*
* The metadata is used for setting defaults, documentation & validation.
*
}
/**
- * Handle a click event
+ * Handle a click event.
*
* @param array $params
*
}
/**
- * Handle an open event
+ * Handle an open event.
*
* @param array $params
*
}
/**
+ * Preview mailing.
+ *
* @param array $params
+ * Array per getfields metadata.
+ *
* @return array
* @throws \API_Exception
*/
}
/**
+ * Adjust metadata for send test function.
+ *
* @param array $spec
*/
function _civicrm_api3_mailing_send_test_spec(&$spec) {
}
/**
+ * Send test mailing.
+ *
* @param array $params
+ *
* @return array
* @throws \API_Exception
* @throws \CiviCRM_API3_Exception
}
/**
- * Adjust Metadata for send_mail action
+ * Adjust Metadata for send_mail action.
*
* The metadata is used for setting defaults, documentation & validation.
*
}
/**
+ * Function which needs to be explained.
+ *
* @param array $params
+ *
* @return array
* @throws \API_Exception
*/
}
/**
- * Fix the reset dates on the email record based on when a mail was last delivered
+ * Fix the reset dates on the email record based on when a mail was last delivered.
+ *
* We only consider mailings that were completed and finished in the last 3 to 7 days
* Both the min and max days can be set via the params
+ *
* @param array $params
+ *
* @return array
*/
function civicrm_api3_mailing_update_email_resetdate($params) {
* @subpackage API_MailerGroup
* @copyright CiviCRM LLC (c) 2004-2014
* $Id$
- *
*/
/**
- * Subscribe from mailing group
+ * Subscribe from mailing group.
*
* @param array $params
- * Associative array of property.
- * name/value pairs to insert in new 'survey'
+ * Array per getfields metadata.
*
* @throws API_Exception
* @return array
* api result array
- * {@getfields mailing_event_subscribe_create}
*/
function civicrm_api3_mailing_event_subscribe_create($params) {
$email = $params['email'];
* @subpackage API_MailerGroup
* @copyright CiviCRM LLC (c) 2004-2014
* $Id$
- *
*/
/**
- * Unsubscribe from mailing group
+ * Unsubscribe from mailing group.
*
* @param array $params
- * Associative array of property.
- * name/value pairs to insert in new 'survey'
+ * Array per getfields metadata.
*
- * @return array api result array {@getfields mailing_event_unsubscribe_create}
+ * @return array
+ * Api result array
*/
function civicrm_api3_mailing_event_unsubscribe_create($params) {
* @subpackage API_MailerGroup
* @copyright CiviCRM LLC (c) 2004-2014
* $Id$
- *
*/
/**
+ * Declare deprecated functions.
+ *
* @deprecated api notice
* @return string
* to indicate this entire api entity is deprecated
}
/**
+ * Delete mailing group.
+ *
* @param array $params
+ *
* @return array
* @throws \API_Exception
*/
/**
* @param array $params
+ *
* @return array
*/
function civicrm_api3_mailing_group_getfields($params) {
* @subpackage API_Mailing
* @copyright CiviCRM LLC (c) 2004-2014
* $Id$
- *
*/
/**
* Handle creation of a Mailing Job for a Mailing.
+ *
* @param array $params
+ *
* @return array
* @throws \API_Exception
*/
}
/**
- * Returns array of Mailing Jobs matching a set of one or more group properties
+ * Returns array of Mailing Jobs matching a set of one or more group properties.
*
* @param array $params
* Array of one or more valid.
*
* @return array
* API return Array of matching mailing jobs.
- * {@getfields mailing_job_get}
*/
function civicrm_api3_mailing_job_get($params) {
return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
/**
* Handle deletion of a Mailing Job for a Mailing.
+ *
* @param array $params
+ *
* @return array
* @throws \API_Exception
*/
}
/**
- * Deletes an existing membership status
+ * Deletes an existing membership status.
*
* This API is used for deleting a membership status
*
* @param array $params
+ *
* @return array
*/
function civicrm_api3_membership_status_delete($params) {
}
/**
- * Derives the Membership Status of a given Membership Reocrd
+ * Derives the Membership Status of a given Membership Record.
*
* This API is used for deriving Membership Status of a given Membership
* record using the rules encoded in the membership_status table.
*
* @return array
* Array of status id and status name
- * @public
*/
function civicrm_api3_membership_status_calc($membershipParams) {
if (!($membershipID = CRM_Utils_Array::value('membership_id', $membershipParams))) {
}
/**
- * Deletes an existing note
+ * Deletes an existing note.
*
* This API is used for deleting a note
*
* @param array $params
* Including id of the note to be deleted.
- * {@getfields note_delete}
*
- * @return null
+ * @return array
*/
function civicrm_api3_note_delete($params) {
}
/**
- * Adjust Metadata for Get action
+ * Adjust Metadata for Get action.
*
* The metadata is used for setting defaults, documentation & validation.
*
}
/**
- * Get all descendents of given note
+ * Get all descendants of given note.
*
* @param array $params
- * Associative array; only required 'id' parameter is used.
+ * array; only required 'id' parameter is used.
*
* @return array
* Nested associative array beginning with direct children of given note.
}
/**
- * Create a default participant line item
+ * Create a default participant line item.
*
* @todo this should be done in the BAO not the api
*
*
* @copyright CiviCRM LLC (c) 2004-2014
* @version $Id: Participant.php 30486 2010-11-02 16:12:09Z shot $
- *
*/
/**
}
/**
- * Deletes an existing Participant Payment
- *
- * This API is used for deleting a Participant Payment
+ * Deletes an existing Participant Payment.
*
* @param array $params
*
* @return array
* API result
- * @example ParticipantPaymentDelete.php
- * {@getfields ParticipantPayment_delete}
*/
function civicrm_api3_participant_payment_delete($params) {
$participant = new CRM_Event_BAO_ParticipantPayment();
}
/**
- * Retrieve one / all contribution(s) / participant(s) linked to a
- * contribution.
+ * Retrieve one or more participant payment records.
*
* @param array $params
* Input parameters.
*
* @return array
* array of properties, if error an array with an error id and error message
- * @example ParticipantPaymentGet
- * {@getfields ParticipantPayment_get}
*/
function civicrm_api3_participant_payment_get($params) {
return _civicrm_api3_basic_get('CRM_Event_DAO_ParticipantPayment', $params);
* @subpackage API_Contact
* @copyright CiviCRM LLC (c) 2004-2014
* $Id: PaymentProcessorType.php 30415 2010-10-29 12:02:47Z shot $
- *
- */
-
-/**
- * Include common API util functions
*/
/**
- * create payment_processor type
+ * Create payment_processor type.
*
* @param array $params
* Associative array of property name/value pairs to insert in new payment_processor type.
}
/**
- * Delete a payment_processor type delete
+ * Delete a payment_processor type delete.
*
* @param array $params
*
*/
/**
- * Add an Phone for a contact
- *
- * Allowed @params array keys are:
- * {@getfields phone_create}
- * @example PhoneCreate.php
+ * Add an Phone for a contact.
*
* @param array $params
+ * Array per getfields metadata.
*
* @return array
* Array of newly created phone property values.
}
/**
- * Deletes an existing Phone
+ * Delete an existing Phone.
*
* @param array $params
+ * Array per getfields metadata.
*
* @return array
* Api Result
- * {@getfields phone_delete}
- * @example PhoneDelete.php
*/
function civicrm_api3_phone_delete($params) {
return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
*/
/**
- * Include utility functions.
- */
-
-/**
- * Creates or updates an Pledge.
+ * Create or updates an Pledge.
*
* @return array
* Array containing 'is_error' to denote success or failure and details of the created pledge
- *
*/
function civicrm_api3_pledge_create($params) {
_civicrm_api3_pledge_format_params($params, TRUE);
}
/**
- * Delete a pledge
+ * Delete a pledge.
*
* @param array $params
* Array included 'pledge_id' of pledge to delete.
*
- * @return bool
- * true if success, else false
- * {@getfields pledge_delete}
- * @example PledgeDelete.php
+ * @return array
*/
function civicrm_api3_pledge_delete($params) {
if (CRM_Pledge_BAO_Pledge::deletePledge($params['id'])) {
}
/**
+ * Adjust metadata for pledge delete action.
+ *
* @param array $params
*/
function _civicrm_api3_pledge_delete_spec(&$params) {
}
/**
- * return field specification specific to get requests
+ * Adjust field specification specific to get requests.
+ *
* @param array $params
*/
function _civicrm_api3_pledge_get_spec(&$params) {
}
/**
- * return field specification specific to get requests
+ * Adjust field specification specific to get requests.
+ *
* @param array $params
*/
function _civicrm_api3_pledge_create_spec(&$params) {
}
/**
- * Retrieve a set of pledges, given a set of input params
+ * Retrieve a set of pledges, given a set of input params.
*
* @param array $params
* Input parameters. Use interrogate for possible fields.
}
/**
- * Set default to not return test params
+ * Set default to not return test params.
*/
function _civicrm_api3_pledge_get_defaults() {
return array('pledge_test' => 0);
}
/**
- * Legacy function - I removed a bunch of stuff no longer required from here but it still needs
+ * Legacy function to format pledge parameters.
+ *
+ * I removed a bunch of stuff no longer required from here but it still needs
* more culling
* take the input parameter list as specified in the data model and
* convert it into the same format that we use in QF and BAO object
*/
/**
- * Create or update a price_set
+ * Create or update a price_set.
*
* @param array $params
- * Associative array of property.
+ * array of property.
* name/value pairs to insert in new 'price_set'
- * @example PriceSetCreate.php Std Create example
*
* @return array
* api result array
- * {@getfields price_set_create}
*/
function civicrm_api3_price_set_create($params) {
$result = _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
/**
- * Returns array of price_sets matching a set of one or more group properties
+ * Returns array of price_sets 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_sets
- * {@getfields price_set_get}
*/
function civicrm_api3_price_set_get($params) {
// hack to make getcount work. - not sure the best approach here
}
/**
- * delete an existing price_set
+ * Delete an existing price_set.
*
* This method is used to delete any existing price_set. id of the group
* to be deleted is required field in $params array
*
* @return array
* API result array
- * {@getfields price_set_delete}
*/
function civicrm_api3_price_set_delete($params) {
return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
*/
/**
+ * Notify caller of deprecated function.
+ *
* @deprecated api notice
* @return string
* to indicate this entire api entity is deprecated
/**
* Get the list of signatories
* @deprecated - api currently not supported
+ *
* @param array $params
- * (reference ) input parameters.
+ * input parameters.
*
* @return array
*/
}
/**
- * Returns array of uf groups (profiles) matching a set of one or more group properties.
+ * Returns array of uf groups (profiles) matching a set of one or more group properties.
*
* @param array $params
* Array per getfields metadata.
}
/**
- * field id accepted for backward compatibility - unset required on id
+ * Field id accepted for backward compatibility - unset required on id.
+ *
* @param array $params
*/
function _civicrm_api3_uf_field_delete_spec(&$params) {
*
* @return array
* API result array
- *
*/
function civicrm_api3_word_replacement_delete($params) {
return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);