/**
* Version 3 wrapper for civicrm_api. Throws exception
*
- * @param string $entity type of entities to deal with
- * @param string $action create, get, delete or some special action name.
- * @param array $params array to be passed to function
+ * @param string $entity
+ * Type of entities to deal with.
+ * @param string $action
+ * Create, get, delete or some special action name.
+ * @param array $params
+ * Array to be passed to function.
*
* @throws CiviCRM_API3_Exception
* @return array
/**
* Convert possibly camel name to underscore separated entity name
*
- * @param string $entity entity name in various formats e.g. Contribution, contribution, OptionValue, option_value, UFJoin, uf_join
+ * @param string $entity
+ * Entity name in various formats e.g. Contribution, contribution, OptionValue, option_value, UFJoin, uf_join.
* @return string $entity entity name in underscore separated format
*
* FIXME: Why isn't this called first thing in civicrm_api wrapper?
/**
* Having a DAO object find the entity name
- * @param object $bao DAO being passed in
+ * @param object $bao
+ * DAO being passed in.
* @return string
*/
function _civicrm_api_get_entity_name_from_dao($bao){
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or 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
+ * @param array $params
+ * Array containing id of the action_schedule.
* to be deleted
*
* @return array API result array
/**
* Creates or updates an Activity. See the example for usage
*
- * @param array $params Associative array of property name/value
+ * @param array $params
+ * Associative array of property name/value.
* pairs for the activity.
* {@getfields activity_create}
*
/**
* 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
+ * @param array $params
+ * (reference) array of parameters determined by getfields.
*/
function _civicrm_api3_activity_create_spec(&$params) {
/**
* Gets a CiviCRM activity according to parameters
*
- * @param array $params Associative array of property name/value
+ * @param array $params
+ * Associative array of property name/value.
* pairs for the activity.
*
* @return array
*
* NOTE: Called by civicrm-core and CiviHR
*
- * @param array $params API request parameters
+ * @param array $params
+ * API request parameters.
* @param array $activities
* @return array new activities list
*/
/**
* Delete a specified Activity.
*
- * @param array $params array holding 'id' of activity to be deleted
+ * @param array $params
+ * Array holding 'id' of activity to be deleted.
* {@getfields activity_delete}
*
* @throws API_Exception
/**
* Check for required params
*
- * @param array $params associated array of fields
+ * @param array $params
+ * Associated array of fields.
*
* @throws API_Exception
* @throws Exception
/**
* @see _civicrm_api3_generic_getlist_params.
*
- * @param $request array
+ * @param $request
+ * Array.
*/
function _civicrm_api3_activity_getlist_params(&$request) {
$fieldsToReturn = array('activity_date_time', 'activity_type_id', 'subject', 'source_contact_id');
/**
* @see _civicrm_api3_generic_getlist_output
*
- * @param $result array
- * @param $request array
+ * @param $result
+ * Array.
+ * @param $request
+ * Array.
*
* @return array
*/
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_activity_contact_create_spec(&$params) {
$params['contact_id']['api.required'] = 1;
/**
* Deletes an existing ActivityContact record
*
- * @param array $params
+ * @param array $params
*
* @return array Api Result
*
*
* @example ActivityContact.php
*
- * @param array $params an associative array of name/value pairs.
+ * @param array $params
+ * An associative array of name/value pairs.
*
* @return array details of found tags else error
*
/**
* create activity type (
*
- * @param array $params associated array of fields
+ * @param array $params
+ * Associated array of fields.
* $params['option_value_id'] is required for updation of activity type
*
* @return array $activityType created / updated activity type
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_activity_type_create_spec(&$params) {
$params['label']['api.required'] = 1;
/**
* delete activity type
*
- * @param array $params array including id of activity_type to delete
+ * @param array $params
+ * Array including id of activity_type to delete.
* @return array API result array
*
/**
* Adjust Metadata for Create action
*
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_address_create_spec(&$params) {
$params['location_type_id']['api.required'] = 1;
/**
* Adjust Metadata for Get action
*
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_address_get_spec(&$params) {
$params['world_region'] = array(
/**
* Deletes an existing Address
*
- * @param array $params
+ * @param array $params
*
* {@getfields address_delete}
* {@example AddressDelete.php 0}
* Retrieve one or more addresses on address_id, contact_id, street_name, city
* or a combination of those
*
- * @param mixed[] (reference ) input parameters
+ * @param mixed[] (reference ) input parameters
*
* {@example AddressGet.php 0}
- * @param array $params an associative array of name/value pairs.
+ * @param array $params
+ * An associative array of name/value pairs.
*
* @return array details of found addresses else error
* {@getfields address_get}
/**
* Adjust metadata for "create" action
*
- * @param array $spec list of fields
+ * @param array $spec
+ * List of fields.
*/
function _civicrm_api3_attachment_create_spec(&$spec) {
$spec = array_merge($spec, _civicrm_api3_attachment_getfields());
/**
* Create an attachment
*
- * @param array $params
+ * @param array $params
* @return array of newly created file property values.
* @access public
* @throws API_Exception validation errors
/**
* Adjust metadata for "create" action
*
- * @param array $spec list of fields
+ * @param array $spec
+ * List of fields.
*/
function _civicrm_api3_attachment_get_spec(&$spec) {
$spec = array_merge($spec, _civicrm_api3_attachment_getfields());
/**
* @param array $params
* @param int|null $id the user-supplied ID of the attachment record
- * @param array $file the user-supplied vales for the file (mime_type, description, upload_date)
- * @param array $entityFile the user-supllied values of the entity-file (entity_table, entity_id)
+ * @param array $file
+ * The user-supplied vales for the file (mime_type, description, upload_date).
+ * @param array $entityFile
+ * The user-supllied values of the entity-file (entity_table, entity_id).
* @param bool $isTrusted
* @return CRM_Core_DAO
* @throws API_Exception
}
/**
- * @param CRM_Core_DAO_File $fileDao maybe "File" or "File JOIN EntityFile"
- * @param CRM_Core_DAO_EntityFile $entityFileDao maybe "EntityFile" or "File JOIN EntityFile"
- * @param bool $returnContent whether to return the full content of the file
- * @param bool $isTrusted whether the current request is trusted to perform file-specific operations
+ * @param CRM_Core_DAO_File $fileDao
+ * Maybe "File" or "File JOIN EntityFile".
+ * @param CRM_Core_DAO_EntityFile $entityFileDao
+ * Maybe "EntityFile" or "File JOIN EntityFile".
+ * @param bool $returnContent
+ * Whether to return the full content of the file.
+ * @param bool $isTrusted
+ * Whether the current request is trusted to perform file-specific operations.
* @return array
*/
function _civicrm_api3_attachment_format_result($fileDao, $entityFileDao, $returnContent, $isTrusted) {
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or 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
* In case of updating existing campaign, id of that particular campaign must
* be in $params array.
*
- * @param array $params (reference) Associative array of property
+ * @param array $params
+ * (reference) Associative array of property.
* name/value pairs to insert in new 'campaign'
*
* @return array campaign array
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_campaign_create_spec(&$params) {
$params['title']['api.required'] = 1;
/**
* Returns array of campaigns matching a set of one or more group properties
*
- * @param array $params Array of one or more valid
+ * @param array $params
+ * Array of one or more valid.
* property_name=>value pairs. If $params is set
* as null, all campaigns will be returned
*
* This method is used to delete any existing campaign. id of the group
* to be deleted is required field in $params array
*
- * @param array $params (reference) array containing id of the group
+ * @param array $params
+ * (reference) array containing id of the group.
* to be deleted
*
* @return array (reference) returns flag true if successful, error
/**
* Open a new case, add client and manager roles, and add standard timeline
*
- * @param array (
+ * @param array (
* //REQUIRED:
* 'case_type_id' => int OR
* 'case_type' => str (provide one or the other)
/**
* Adjust Metadata for Get Action
*
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_case_get_spec(&$params) {
$params['contact_id']['api.aliases'] = array('client_id');
/**
* Adjust Metadata for Create Action
*
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or 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
+ * @param array $params
+ * Array or 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
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_case_delete_spec(&$params) {
$params['id']['api.required'] = 1;
/**
* Update a specified case.
*
- * @param array (
+ * @param array (
* //REQUIRED:
* 'case_id' => int
*
/**
* Delete a specified case.
*
- * @param array (
+ * @param array (
* //REQUIRED:
* 'id' => int
*
/**
* create or update case type
*
- * @param array $params input parameters
+ * @param array $params
+ * Input parameters.
*
* Allowed @params array keys are:
* {@getfields case_type_create}
/**
* Function to delete case type
*
- * @param array $params array including id of case_type to delete
+ * @param array $params
+ * Array including id of case_type to delete.
* @return array API result array
*
/**
* Create or update a contact (note you should always call this via civicrm_api() & never directly)
*
- * @param array $params input parameters
+ * @param array $params
+ * Input parameters.
*
* Allowed @params array keys are:
* {@getfields contact_create}
/**
* Adjust Metadata for Create action
*
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_contact_create_spec(&$params) {
$params['contact_type']['api.required'] = 1;
/**
* Retrieve one or more contacts, given a set of search params
*
- * @param array input parameters
+ * @param array input parameters
*
* @return array API Result Array
* (@getfields contact_get}
/**
* Adjust Metadata for Get action
*
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_contact_get_spec(&$params) {
$params['contact_is_deleted']['api.default'] = 0;
*
* We also support 'filter_group_id' & 'filter.group_id'
*
- * @param array $params as passed into api get or getcount function
- * @param array $options array of options (so we can modify the filter)
+ * @param array $params
+ * As passed into api get or getcount function.
+ * @param array $options
+ * Array of options (so we can modify the filter).
*/
function _civicrm_api3_contact_get_supportanomalies(&$params, &$options) {
if (isset($params['showAll'])) {
/**
* Delete a contact with given contact id
*
- * @param array $params (reference ) input parameters, contact_id element required
+ * @param array $params
+ * (reference ) input parameters, contact_id element required.
*
* @return array API Result Array
* @access public
* Takes an associative array and creates a contact object and all the associated
* derived objects (i.e. individual, location, email, phone etc)
*
- * @param array $params (reference ) an assoc array of name/value pairs
- * @param int $contactID if present the contact with that ID is updated
+ * @param array $params
+ * (reference ) an assoc array of name/value pairs.
+ * @param int $contactID
+ * If present the contact with that ID is updated.
*
* @return CRM_Contact_BAO_Contact object
* @access public
/**
* Validate the addressee or email or postal greetings
*
- * @param array $params Associative array of property name/value
+ * @param array $params
+ * Associative array of property name/value.
* pairs to insert in new contact.
*
* @throws API_Exception
/**
* Merges given pair of duplicate contacts.
*
- * @param array $params input parameters
+ * @param array $params
+ * Input parameters.
*
* Allowed @params array keys are:
* {int main_id main contact id with whom merge has to happen}
/**
* @see _civicrm_api3_generic_getlist_params
*
- * @param $request array
+ * @param $request
+ * Array.
*/
function _civicrm_api3_contact_getlist_params(&$request) {
// get the autocomplete options from settings
/**
* @see _civicrm_api3_generic_getlist_output
*
- * @param $result array
- * @param $request array
+ * @param $result
+ * Array.
+ * @param $request
+ * Array.
*
* @return array
*/
* In case of updating existing contact_type, id of that particular contact_type must
* be in $params array.
*
- * @param array $params (reference) Associative array of property
+ * @param array $params
+ * (reference) Associative array of property.
* name/value pairs to insert in new 'contact_type'
*
* @return array contact_type array
/**
* Returns array of contact_types matching a set of one or more group properties
*
- * @param array $params one or more valid
+ * @param array $params
+ * One or more valid.
* property_name=>value pairs. If $params is set
* as null, all contact_types will be returned
*
* This method is used to delete any existing contact_type. id of the group
* to be deleted is required field in $params array
*
- * @param array $params array containing id of the group
+ * @param array $params
+ * Array containing id of the group.
* to be deleted
*
* @return array API Result Array
/**
* Add or update a contribution
*
- * @param array $params (reference ) input parameters
+ * @param array $params
+ * (reference ) input parameters.
*
* @throws API_Exception
* @return array Api result array
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_contribution_create_spec(&$params) {
$params['contact_id']['api.required'] = 1;
/**
* Delete a contribution
*
- * @param array $params (reference ) input parameters
+ * @param array $params
+ * (reference ) input parameters.
*
* @return boolean true if success, else false
* @static void
/**
* Retrieve a set of contributions, given a set of input params
*
- * @param array $params (reference ) input parameters
+ * @param array $params
+ * (reference ) input parameters.
*
* @return array of contributions, if error an array with an error id and error message
* @static void
* Adjust Metadata for Get action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_contribution_get_spec(&$params) {
$params['contribution_test']['api.default'] = 0;
* 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
*
- * @param array $params Associative array of property name/value
+ * @param array $params
+ * Associative array of property name/value.
* pairs to insert in new contact.
- * @param array $values The reformatted properties that we can use internally
+ * @param array $values
+ * The reformatted properties that we can use internally.
* '
*
* @param bool $create
* Adjust Metadata for Transact action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_contribution_transact_spec(&$params) {
$fields = civicrm_api3('contribution', 'getfields', array('action' => 'create'));
/**
* Process a transaction and record it against the contact.
*
- * @param array $params (reference ) input parameters
+ * @param array $params
+ * (reference ) input parameters.
*
* @return array (reference ) contribution of created or updated record (or a civicrm error)
* @static void
* The appropriate online template will be used (the existence of related objects
* (e.g. memberships ) will affect this selection
*
- * @param array $params input parameters
+ * @param array $params
+ * Input parameters.
* {@getfields Contribution_sendconfirmation}
*
* @throws Exception
* Adjust Metadata for sendconfirmation action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_contribution_sendconfirmation_spec(&$params) {
$params['id'] = array(
* @todo - most of this should live in the BAO layer but as we want it to be an addition
* to 4.3 which is already stable we should add it to the api layer & re-factor into the BAO layer later
*
- * @param array $params input parameters
+ * @param array $params
+ * Input parameters.
* {@getfields Contribution_completetransaction}
*
* @throws API_Exception
/**
* Create or update a contribution_page
*
- * @param array $params Associative array of property
+ * @param array $params
+ * Associative array of property.
* name/value pairs to insert in new 'contribution_page'
* @example ContributionPageCreate.php Std Create example
*
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
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
*
- * @param array $params Array of one or more valid property_name=>value pairs.
+ * @param array $params
+ * Array of one or more valid property_name=>value pairs.
*
* @return array API Result array Array of matching contribution_pages
* {@getfields contribution_page_get}
* 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
+ * @param array $params
+ * Array containing id of the group.
* to be deleted
*
* @return array API result Array
* This method is used to delete any existing contribution_page. id of the group
* to be deleted is required field in $params array
*
- * @param array $params (reference) array containing id of the group
+ * @param array $params
+ * (reference) array containing id of the group.
* to be deleted
*
* @return array API result array
/**
* Create or update a contribution_recur
*
- * @param array $params Associative array of property
+ * @param array $params
+ * Associative array of property.
* name/value pairs to insert in new 'contribution_recur'
* @example ContributionRecurCreate.php Std Create example
*
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or 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
+ * @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
*
/**
* Cancel a recurring contribution of existing contribution_recur.id
*
- * @param array $params (reference) array containing id of the recurring contribution
+ * @param array $params
+ * (reference) array containing id of the recurring contribution.
*
* @return boolean returns true is successfully cancelled
*/
* This method is used to delete any existing contribution_recur. id of the group
* to be deleted is required field in $params array
*
- * @param array $params array containing id of the group
+ * @param array $params
+ * Array containing id of the group.
* to be deleted
*
* @return array API result array
/**
* Create or Update a Soft Credit
*
- * @param array $params Associative array of property
+ * @param array $params
+ * Associative array of property.
* name/value pairs to insert in new 'contribution_soft'
*
* @example ContributionSoftCreate.php Standard Create Example //FIXME
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_contribution_soft_create_spec(&$params) {
$params['contribution_id']['api.required'] = 1;
/**
* Deletes an existing Soft Credit
*
- * @param array $params
+ * @param array $params
*
* @example ContributionSoftDelete.php Standard Delete Example
*
/**
* Retrieve one or more Soft Credits
*
- * @param array input parameters
+ * @param array input parameters
*
*
* @example ContributionSoftGet.php Standard Get Example
*
- * @param array $params an associative array of name/value pairs.
+ * @param array $params
+ * An associative array of name/value pairs.
*
* @return array api result
* {@getfields contribution_soft_get}
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_country_create_spec(&$params) {
$params['name']['api.required'] = 1;
/**
* Deletes an existing Country
*
- * @param array $params
+ * @param array $params
*
* @example CountryDelete.php Standard Delete Example
*
/**
* Retrieve one or more countrys
*
- * @param array input parameters
+ * @param array input parameters
*
*
* @example CountryGet.php Standard Get Example
*
- * @param array $params an associative array of name/value pairs.
+ * @param array $params
+ * An associative array of name/value pairs.
*
* @return array api result array
* {@getfields country_get}
* as parameters. Some of the most commonly used parameters are
* described below
*
- * @param array $params an associative array used in construction
+ * @param array $params
+ * An associative array used in construction.
* retrieval of the object
*
*/
* function after deletion so that the field is available for us (getfields manages date conversion
* among other things
*
- * @param $params array Associative array of property name/value pairs to create new custom field.
+ * @param $params
+ * Array Associative array of property name/value pairs to create new custom field.
*
* @return Newly API success object
*
/**
* Adjust Metadata for Create action
*
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_custom_field_create_spec(&$params) {
$params['label']['api.required'] = 1;
/**
* Use this API to delete an existing custom group field.
*
- * @param $params Array id of the field to be deleted
+ * @param $params
+ * Array id of the field to be deleted.
*
* @return array
* @example CustomFieldDelete.php
/**
* Use this API to get existing custom fields.
*
- * @param array $params Array to search on
+ * @param array $params
+ * Array to search on.
*{*
*
* @return array
* Helper function to validate custom field value
* @deprecated
*
- * @param String $fieldName Custom field name (eg: custom_8 )
- * @param Mixed $value Field value to be validate
- * @param Array $fieldDetails Field Details
- * @param Array $errors Collect validation errors
+ * @param string $fieldName
+ * Custom field name (eg: custom_8 ).
+ * @param mixed $value
+ * Field value to be validate.
+ * @param array $fieldDetails
+ * Field Details.
+ * @param array $errors
+ * Collect validation errors.
*
* @return array Validation errors
* @todo remove this function - not in use but need to review functionality before
* as parameters. Some of the most commonly used parameters are
* described below
*
- * @param array $params an associative array used in construction
+ * @param array $params
+ * An associative array used in construction.
* retrieval of the object
* @todo missing get function
*
* See the CRM Data Model for custom_group property definitions
* $params['class_name'] is a required field, class being extended.
*
- * @param $params array Associative array of property name/value pairs to insert in group.
+ * @param $params
+ * Array Associative array of property name/value pairs to insert in group.
* {@getfields CustomGroup_create}
*
* @return Newly create custom_group object
/**
* Adjust Metadata for Create action
*
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_custom_group_create_spec(&$params) {
$params['extends']['api.required'] = 1;
/**
* Use this API to get existing custom fields.
*
- * @param array $params Array to search on
+ * @param array $params
+ * Array to search on.
*
* @return array
* @access public
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_custom_search_create_spec(&$params) {
require_once 'api/v3/OptionValue.php';
/**
* Deletes an existing ReportTemplate
*
- * @param array $params
+ * @param array $params
*
* {@example ReportTemplateDelete.php 0}
*
* Sets custom values for an entity.
*
*
- * @param $params expected keys are in format custom_fieldID:recordID or custom_groupName:fieldName:recordID
+ * @param $params
+ * Expected keys are in format custom_fieldID:recordID or custom_groupName:fieldName:recordID.
* for example:
* // entity ID. You do not need to specify entity type, we figure it out based on the fields you're using
* 'entity_id' => 123,
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_custom_value_create_spec(&$params) {
$params['entity_id']['api.required'] = 1;
/**
* Use this API to get existing custom values for an entity.
*
- * @param $params array specifying the entity_id
+ * @param $params
+ * Array specifying the entity_id.
* Optionally include entity_type param, i.e. 'entity_type' => 'Activity'
* If no entity_type is supplied, it will be determined based on the fields you request.
* If no entity_type is supplied and no fields are specified, 'Contact' will be assumed.
* Adjust Metadata for Get action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_custom_value_get_spec(&$params) {
$params['entity_id']['api.required'] = 1;
/**
* Creates or updates an Dashlet.
*
- * @param array $params array of property name/value
+ * @param array $params
+ * Array of property name/value.
* pairs for the Dashlet.
*
* @return array Array containing 'is_error' to denote success or failure and details of the created activity
/**
* 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
+ * @param array $params
+ * (reference) array of parameters determined by getfields.
*/
function _civicrm_api3_dashboard_create_spec(&$params) {
unset($params['version']);
/**
* Gets a CiviCRM Dashlets according to parameters
*
- * @param array $params Associative array of property name/value
+ * @param array $params
+ * Associative array of property name/value.
* pairs for the activity.
*
* @return array
/**
* Delete a specified Dashlet.
*
- * @param array $params array holding 'id' OR 'name' of dashlet to be deleted
+ * @param array $params
+ * Array holding 'id' OR 'name' of dashlet to be deleted.
*
* @return void|CRM_Core_Error An error if 'name or ID' is invalid,
*
/**
* Gets a CiviCRM Dashlets of Contacts according to parameters
*
- * @param array $params Associative array of property name/value
+ * @param array $params
+ * Associative array of property name/value.
* pairs for the activity.
*
* @return array
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_dashboard_contact_create_spec(&$params) {
unset($params['version']);
* Adjust Metadata for Get action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_domain_get_spec(&$params) {
$params['current_domain'] = array('title' => "get loaded domain");
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_domain_create_spec(&$params) {
$params['domain_version'] = $params['version'];
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_email_create_spec(&$params) {
// TODO a 'clever' default should be introduced
/**
* Deletes an existing Email
*
- * @param array $params
+ * @param array $params
*
* @example EmailDelete.php Standard Delete Example
*
/**
* Retrieve one or more emails
*
- * @param array input parameters
+ * @param array input parameters
*
*
* @example EmailGet.php Standard Get Example
*
- * @param array $params an associative array of name/value pairs.
+ * @param array $params
+ * An associative array of name/value pairs.
*
* @return array api result array
* {@getfields email_get}
* Adjust Metadata for Get action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_entity_tag_get_spec(&$params) {
$params['entity_id']['api.aliases'] = array('contact_id');
*
* This API is used for creating a Event
*
- * @param array $params input parameters
+ * @param array $params
+ * Input parameters.
* Allowed @params array keys are:
* {@getfields event_create}
*
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_event_create_spec(&$params) {
$params['start_date']['api.required'] = 1;
* Get Event record.
*
*
- * @param array $params an associative array of name/value property values of civicrm_event
+ * @param array $params
+ * An associative array of name/value property values of civicrm_event.
* {@getfields event_get}
*
* @return Array of all found event property values.
* Adjust Metadata for Get action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_event_get_spec(&$params) {
$params['financial_type_id']['api.aliases'] = array('contribution_type_id');
*
* This API is used for deleting a event
*
- * @param Array $params array containing event_id to be deleted
+ * @param Array $params
+ * Array containing event_id to be deleted.
*
* @return boolean true if success, error otherwise
* @access public
* add 'is_full' & 'available_seats' to the return array. (this might be better in the BAO)
* Default BAO function returns a string if full rather than a Bool - which is more appropriate to a form
*
- * @param array $event return array of the event
- * @param int $event_id Id of the event to be updated
+ * @param array $event
+ * Return array of the event.
+ * @param int $event_id
+ * Id of the event to be updated.
*
*/
/**
/**
* @see _civicrm_api3_generic_getlist_params.
*
- * @param $request array
+ * @param $request
+ * Array.
*/
function _civicrm_api3_event_getlist_params(&$request) {
$fieldsToReturn = array('start_date', 'event_type_id', 'title', 'summary');
/**
* @see _civicrm_api3_generic_getlist_output
*
- * @param $result array
- * @param $request array
+ * @param $result
+ * Array.
+ * @param $request
+ * Array.
*
* @return array
*/
/**
* Install an extension
*
- * @param array $params input parameters
+ * @param array $params
+ * Input parameters.
* - key: string, eg "com.example.myextension"
* - keys: mixed; array of string, eg array("com.example.myextension1", "com.example.myextension2") or string with comma-delimited list
* using 'keys' should be more performant than making multiple API calls with 'key'
/**
* Enable an extension
*
- * @param array $params input parameters
+ * @param array $params
+ * Input parameters.
* - key: string, eg "com.example.myextension"
* - keys: mixed; array of string, eg array("com.example.myextension1", "com.example.myextension2") or string with comma-delimited list
* using 'keys' should be more performant than making multiple API calls with 'key'
/**
* Disable an extension
*
- * @param array $params input parameters
+ * @param array $params
+ * Input parameters.
* - key: string, eg "com.example.myextension"
* - keys: mixed; array of string, eg array("com.example.myextension1", "com.example.myextension2") or string with comma-delimited list
* using 'keys' should be more performant than making multiple API calls with 'key'
/**
* Uninstall an extension
*
- * @param array $params input parameters
+ * @param array $params
+ * Input parameters.
* - key: string, eg "com.example.myextension"
* - keys: array of string, eg array("com.example.myextension1", "com.example.myextension2")
* using 'keys' should be more performant than making multiple API calls with 'key'
/**
* Download and install an extension
*
- * @param array $params input parameters
+ * @param array $params
+ * Input parameters.
* - key: string, eg "com.example.myextension"
* - url: string eg "http://repo.com/myextension-1.0.zip"
*
/**
* Download and install an extension
*
- * @param array $params input parameters
+ * @param array $params
+ * Input parameters.
* - local: bool, whether to rescan local filesystem (default: TRUE)
* - remote: bool, whether to rescan remote repository (default: TRUE)
*
/**
* Determine the list of extension keys
*
- * @param array $params API request params with 'key' or 'keys'
+ * @param array $params
+ * API request params with 'key' or 'keys'.
* @return array of extension keys
* @throws API_Exception
*/
*
* This API is used for creating a file
*
- * @param array $params an associative array of name/value property values of civicrm_file
+ * @param array $params
+ * An associative array of name/value property values of civicrm_file.
*
* @return array of newly created file property values.
* @access public
* 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
+ * @param array $params
+ * An associative array of name/value property values of civicrm_file.
*
* @return Array of all found file object property values.
* @access public
* This api is used for updating an existing file.
* Required parameters : id of a file
*
- * @param Array $params an array of name/value property values of civicrm_file
+ * @param Array $params
+ * An array of name/value property values of civicrm_file.
*
* @return array of updated file object property values
* @access public
* access multiple objects e.g. contact api accesses is_deleted from the activity
* table & from the contact table
*
- * @param array $apiRequest api request as an array. Keys are
+ * @param array $apiRequest
+ * Api request as an array. Keys are.
* - entity: string
* - action: string
* - version: string
/**
* API return function to reformat results as count
*
- * @param array $apiRequest api request as an array. Keys are
+ * @param array $apiRequest
+ * Api request as an array. Keys are.
*
* @throws API_Exception
* @return integer count of results
/**
* API return function to reformat results as single result
*
- * @param array $apiRequest api request as an array. Keys are
+ * @param array $apiRequest
+ * Api request as an array. Keys are.
*
* @return integer count of results
*/
/**
* API return function to reformat results as single value
*
- * @param array $apiRequest api request as an array. Keys are
+ * @param array $apiRequest
+ * Api request as an array. Keys are.
*
* @return integer count of results
*/
/**
* API to determine if a record is in-use
*
- * @param array $apiRequest api request as an array
+ * @param array $apiRequest
+ * Api request as an array.
*
* @throws API_Exception
* @return array API result (int 0 or 1)
/**
* API wrapper for replace function
*
- * @param array $apiRequest api request as an array. Keys are
+ * @param array $apiRequest
+ * Api request as an array. Keys are.
*
* @return integer count of results
*/
/**
* API wrapper for getoptions function
*
- * @param array $apiRequest api request as an array.
+ * @param array $apiRequest
+ * Api request as an array.
*
* @return array of results
*/
*
* This function is only split out for the purpose of code clarity / comment block documentation
*
- * @param array $metadata the array of metadata that will form the result of the getfields function
+ * @param array $metadata
+ * The array of metadata that will form the result of the getfields function.
* @param $apiRequest
- * @param string $fieldname field currently being processed
- * @param array $fieldSpec metadata for that field
- * @param array $fieldsToResolve anny field resolutions specifically requested
+ * @param string $fieldname
+ * Field currently being processed.
+ * @param array $fieldSpec
+ * Metadata for that field.
+ * @param array $fieldsToResolve
+ * Anny field resolutions specifically requested.
*/
function _civicrm_api3_generic_get_metadata_options(&$metadata, $apiRequest, $fieldname, $fieldSpec, $fieldsToResolve){
if (empty($fieldSpec['pseudoconstant']) && empty($fieldSpec['option_group_id'])) {
/**
* Generic api wrapper used for quicksearch and autocomplete
*
- * @param $apiRequest array
+ * @param $apiRequest
+ * Array.
* @return mixed
*/
function civicrm_api3_generic_getList($apiRequest) {
/**
* Set defaults for api.getlist
*
- * @param $entity string
- * @param $request array
+ * @param $entity
+ * String.
+ * @param $request
+ * Array.
*/
function _civicrm_api3_generic_getList_defaults($entity, &$request) {
$config = CRM_Core_Config::singleton();
/**
* Fallback implementation of getlist_params. May be overridden by individual apis
*
- * @param $request array
+ * @param $request
+ * Array.
*/
function _civicrm_api3_generic_getlist_params(&$request) {
$fieldsToReturn = array($request['id_field'], $request['label_field']);
/**
* Fallback implementation of getlist_output. May be overridden by individual apis
*
- * @param $result array
- * @param $request array
+ * @param $result
+ * Array.
+ * @param $request
+ * Array.
*
* @return array
*/
* To do this, perform a 'get' action to load the existing values, then merge in the updates
* and call 'create' to save the revised entity.
*
- * @param array $apiRequest array with keys:
+ * @param array $apiRequest
+ * Array with keys:.
* - entity: string
* - action: string
* - version: string
* In case of updating existing grant, id of that particular grant must
* be in $params array.
*
- * @param array $params Associative array of property
+ * @param array $params
+ * Associative array of property.
* name/value pairs to insert in new 'grant'
*
* @return array grant array
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_grant_create_spec(&$params) {
$params['grant_type_id']['api.required'] = 1;
/**
* Returns array of grants matching a set of one or more group properties
*
- * @param array $params Array of one or more valid
+ * @param array $params
+ * Array of one or more valid.
* property_name=>value pairs. If $params is set
* as null, all grants will be returned
*
* 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
+ * @param array $params
+ * Array containing id of the group.
* to be deleted
*
* @return array API Result Array
* be in $params array. Either id or name is required field in the
* $params array
*
- * @param array $params Associative array of property
+ * @param array $params
+ * Associative array of property.
* name/value pairs to insert in new 'group'
*
* @return array API result array
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or 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
+ * @param array $params
+ * Array of one or more valid.
* property_name=>value pairs. If $params is set
* as null, all groups will be returned
*
* This method is used to delete any existing group. id of the group
* to be deleted is required field in $params array
*
- * @param array $params array containing id of the group
+ * @param array $params
+ * Array containing id of the group.
* to be deleted
*
* @return array API result 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
+ * @param array $params
+ * Name value pair of contact information.
* {@getfields GroupContact_get}
*
* @return array list of groups, given contact subsribed to
*
* @access public
*
- * @param array $params Input parameters
+ * @param array $params
+ * Input parameters.
*
* Allowed @params array keys are:<br>
* "contact_id" (required) : first contact to add<br>
/**
* Provides group nesting record(s) given parent and/or child id.
*
- * @param array $params an array containing at least child_group_id or parent_group_id
+ * @param array $params
+ * An array containing at least child_group_id or parent_group_id.
* {@getfields GroupNesting_get}
*
* @return array list of group nesting records
* Creates group nesting record for given parent and child id.
* Parent and child groups need to exist.
*
- * @param array $params parameters array - allowed array keys include:
+ * @param array $params
+ * Parameters array - allowed array keys include:.
*
* @return array TBD
* {@getfields GroupNesting_create
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or 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:
+ * @param array $params
+ * Parameters array - allowed array keys include:.
* {@getfields GroupNesting_delete}
*
* @return array API Success or fail 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
+ * @param array $params
+ * Name value pair of contact information.
* {@getfields GroupOrganization_get}
* @example GroupOrganizationGet.php
*
* @example GroupOrganizationCreate.php
* {@getfields GroupOrganization_create}
*
- * @param $params array
+ * @param $params
+ * Array.
*
* @return array
*
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_group_organization_create_spec(&$params) {
$params['organization_id']['api.required'] = 1;
*
* This API is used for deleting a Group Organization
*
- * @param array $params with 'id' = ID of the Group Organization to be deleted
+ * @param array $params
+ * With 'id' = ID of the Group Organization to be deleted.
*
* @return array API Result
* {@getfields GroupOrganization_delete}
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_im_create_spec(&$params) {
$params['contact_id']['api.required'] = 1;
/**
* Deletes an existing IM
*
- * @param array $params
+ * @param array $params
* {@getfields im_delete}
*
* @return array API result Array
/**
* Retrieve one or more IM
*
- * @param mixed[] (reference ) input parameters
+ * @param mixed[] (reference ) input parameters
* {@getfields im_get}
- * @param array $params an associative array of name/value pairs.
+ * @param array $params
+ * An associative array of name/value pairs.
*
* @return array details of found IM
*
* Adjust metadata for "Create" action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_job_create_spec(&$params) {
$params['run_frequency']['api.required'] = 1;
/**
* create scheduled job
*
- * @param array $params Associative array of property name/value pairs to insert in new job.
+ * @param array $params
+ * Associative array of property name/value pairs to insert in new job.
*
* @return success or error
* {@getfields Job_create}
/**
* Retrieve one or more job
- * @param array input parameters
+ * @param array input parameters
* @return array api result array
* {@getfields email_get}
* @access public
* Dumb wrapper to execute scheduled jobs. Always creates success - errors
* and results are handled in the job log.
*
- * @param array $params (reference ) input parameters
+ * @param array $params
+ * (reference ) input parameters.
*
* @return array API Result Array
*
/**
* Adjust Metadata for Execute action
*
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_job_execute_spec(&$params) {
}
/**
* Geocode group of contacts based on given params
*
- * @param array $params (reference ) input parameters
+ * @param array $params
+ * (reference ) input parameters.
*
* @return array API Result Array
* {@getfields contact_geocode}
/**
* Send the scheduled reminders for all contacts (either for activities or events)
*
- * @param array $params (reference ) input parameters
+ * @param array $params
+ * (reference ) input parameters.
* now - the time to use, in YmdHis format
* - makes testing a bit simpler since we can simulate past/future time
*
* Adjust metadata for "send_reminder" action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_job_send_reminder(&$params) {
//@todo this function will now take all fields in action_schedule as params
/**
* Execute a specific report instance and send the output via email
*
- * @param array $params (reference ) input parameters
+ * @param array $params
+ * (reference ) input parameters.
* sendmail - Boolean - should email be sent?, required
* instanceId - Integer - the report instance ID
* resetVal - Integer - should we reset form state (always true)?
* Adjust Metadata for Get action
*
* The metadata is used for setting defaults, documentation & validation
-* @param array $params array or parameters determined by getfields
+* @param array $params
+* Array or parameters determined by getfields.
*/
function _civicrm_api3_job_update_greeting_spec(&$params) {
$params['ct'] = array(
/**
* Mass update pledge statuses
*
- * @param array $params (reference ) input parameters
+ * @param array $params
+ * (reference ) input parameters.
*
* @return boolean true if success, else false
* @static
/**
* Process participant statuses
*
- * @param array $params (reference ) input parameters
+ * @param array $params
+ * (reference ) input parameters.
*
* @return array (reference ) array of properties, if error an array with an error id and error message
* @access public
* IMPORTANT:
* Sending renewal reminders has been migrated from this job to the Scheduled Reminders function as of 4.3.
*
- * @param array $params input parameters NOT USED
+ * @param array $params
+ * Input parameters NOT USED.
*
* @return boolean true if success, else false
* @static void
/**
* This api checks and updates the status of all survey respondants.
*
- * @param array $params (reference ) input parameters
+ * @param array $params
+ * (reference ) input parameters.
*
* @return boolean true if success, else false
* @static void
/**
* Merges given pair of duplicate contacts.
*
- * @param array $params input parameters
+ * @param array $params
+ * Input parameters.
*
* Allowed @params array keys are:
* {int $rgid rule group id}
/**
* Runs handlePaymentCron method in the specified payment processor
*
- * @param array $params input parameters
+ * @param array $params
+ * Input parameters.
*
* Expected @params array keys are:
* {string 'processor_name' - the name of the payment processor, eg: Sagepay}
/**
* This api cleans up all the old session entries and temp tables. We recommend that sites run this on an hourly basis
*
- * @param array $params (reference ) - sends in various config parameters to decide what needs to be cleaned
+ * @param array $params
+ * (reference ) - sends in various config parameters to decide what needs to be cleaned.
*
* @return boolean true if success, else false
* @static void
/**
* Create or update a line_item
*
- * @param array $params Associative array of property
+ * @param array $params
+ * Associative array of property.
* name/value pairs to insert in new 'line_item'
* @example LineItemCreate.php Std Create example
*
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_line_item_create_spec(&$params) {
$params['entity_id']['api.required'] = 1;
/**
* Returns array of line_items 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
+ * @param array $params
+ * Array of one or more valid property_name=>value pairs. If $params is set.
* as null, all line_items will be returned (default limit is 25)
*
* @return array Array of matching line_items
* This method is used to delete any existing line_item. id of the group
* to be deleted is required field in $params array
*
- * @param array $params array containing id of the group
+ * @param array $params
+ * Array containing id of the group.
* to be deleted
*
* @return array API result array
/**
* Create or update a loc_block
*
- * @param array $params Associative array of property
+ * @param array $params
+ * Associative array of property.
* name/value pairs to insert in new 'loc_block'
* @example LocBlockCreate.php Std Create example
*
/**
* Returns array of loc_blocks matching a set of one or more properties
*
- * @param array $params Array of one or more valid property_name=>value pairs. If $params is set
+ * @param array $params
+ * Array of one or more valid property_name=>value pairs. If $params is set.
* as null, all loc_blocks will be returned (default limit is 25)
*
* @return array Array of matching loc_blocks
* This method is used to delete any existing loc_block.
* id of the record to be deleted is required field in $params array
*
- * @param array $params array containing id of the record to be deleted
+ * @param array $params
+ * Array containing id of the record to be deleted.
*
* @return array API result array
* {@getfields loc_block_delete}
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_location_type_create_spec(&$params) {
$params['is_active']['api.default'] = 1;
/**
* Deletes an existing Location Type
*
- * @param array $params
+ * @param array $params
*
* @example LocationTypeDelete.php Standard Delete Example
*
/**
* Retrieve one or more Location Types
*
- * @param array input parameters
+ * @param array input parameters
*
*
* @example LocationTypeGet.php Standard Get Example
*
- * @param array $params an associative array of name/value pairs.
+ * @param array $params
+ * An associative array of name/value pairs.
*
* @return array api result
* {@getfields LocationType_get}
/**
* Create or update a mail_settings
*
- * @param array $params Associative array of property
+ * @param array $params
+ * Associative array of property.
* name/value pairs to insert in new 'mail_settings'
* @example mail_settingsCreate.php Std Create example
*
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_mail_settings_create_spec(&$params) {
/**
* Returns array of mail_settings matching a set of one or more group properties
*
- * @param array $params Array of one or more valid
+ * @param array $params
+ * Array of one or more valid.
* property_name=>value pairs. If $params is set
* as null, all mail_settings will be returned
*
* This method is used to delete any existing mail_settings. id of the group
* to be deleted is required field in $params array
*
- * @param array $params array containing id of the group
+ * @param array $params
+ * Array containing id of the group.
* to be deleted
*
* @return array api result array
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_mailing_create_spec(&$params) {
$params['name']['api.required'] = 1;
* Adjust Metadata for bounce_spec action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_mailing_event_bounce_spec(&$params) {
$params['job_id']['api.required'] = 1;
* Adjust Metadata for event_reply action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_mailing_event_reply_spec(&$params) {
$params['job_id']['api.required'] = 1;
* Adjust Metadata for event_forward action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_mailing_event_forward_spec(&$params) {
$params['job_id']['api.required'] = 1;
* Adjust Metadata for send_mail action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_mailing_stats_spec(&$params) {
$params['date']['api.default'] = 'now';
* Adjust Metadata for submit action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_mailing_a_b_submit_spec(&$params) {
$mailingFields = CRM_Mailing_DAO_Mailing::fields();
* Adjust Metadata for graph_stats action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_mailing_a_b_graph_stats_spec(&$params) {
$params['criteria']['title'] = 'Criteria';
/**
* Get all the mailings and details that a contact was involved with
*
- * @param array $params input parameters
+ * @param array $params
+ * Input parameters.
* - key: contact_id, value: int - required
* - key: type, value: Delivered | Bounced - optional, defaults to Delivered
* - Future extensions will include: Opened, Clicked, Forwarded
* This is a wrapper for the functions that return the results from the 'quasi-entity'
* mailing contact
* @param array $params
- * @param Boolean $count
+ * @param bool $count
* @throws Exception
*/
function _civicrm_api3_mailing_contact_getresults($params, $count){
/**
* Adjust Metadata for Get action
*
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_mailing_contact_get_spec(&$params) {
$params['contact_id']['api.required'] = 1;
/**
* Get count of all the mailings that a contact was involved with
*
- * @param array $params input parameters
+ * @param array $params
+ * Input parameters.
* - key: contact_id, value: int - required
* - key: type, value: Delivered | Bounced - optional, defaults to Delivered
* - Future extensions will include: Opened, Clicked, Forwarded
/**
* Handle a confirm event
*
- * @param array $params Associative array of property
+ * @param array $params
+ * Associative array of property.
* name/value pairs to insert in new 'survey'
*
* @throws Exception
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_mailing_event_confirm_create_spec(&$params) {
$params['contact_id']['api.required'] = 1;
/**
* Handle a confirm event
*
- * @param array $params Associative array of property
+ * @param array $params
+ * Associative array of property.
* name/value pairs to insert in new 'survey'
*
* @throws Exception
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_mailing_event_queue_create_spec(&$params) {
$params['job_id']['api.required'] = 1;
/**
* Subscribe from mailing group
*
- * @param array $params Associative array of property
+ * @param array $params
+ * Associative array of property.
* name/value pairs to insert in new 'survey'
*
* @return array api result array
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_mailing_event_resubscribe_create_spec(&$params) {
$params['event_queue_id']['api.required'] = 1;
/**
* Subscribe from mailing group
*
- * @param array $params Associative array of property
+ * @param array $params
+ * Associative array of property.
* name/value pairs to insert in new 'survey'
*
* @throws API_Exception
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_mailing_event_subscribe_create_spec(&$params) {
$params['email']['api.required'] = 1;
/**
* Unsubscribe from mailing group
*
- * @param array $params Associative array of property
+ * @param array $params
+ * Associative array of property.
* name/value pairs to insert in new 'survey'
*
* @return array api result array
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_mailing_event_unsubscribe_create_spec(&$params) {
$params['job_id']['api.required'] = 1;
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_mailing_job_create_spec(&$params) {
$params['status']['api.default'] = 'Scheduled';
/**
* Returns array of Mailing Jobs matching a set of one or more group properties
*
- * @param array $params Array of one or more valid
+ * @param array $params
+ * Array of one or more valid.
* @param array $ids
*
* @return array API return Array of matching mailing jobs
/**
* Returns array of Mailing Recipients
*
- * @param array $params Array of one or more valid
+ * @param array $params
+ * Array of one or more valid.
* @param array $ids
*
* @return array API return Array of matching mailing jobs
*
* This API is used for deleting a contact membership
*
- * @param $params array array holding id - Id of the contact membership to be deleted
+ * @param $params
+ * Array array holding id - Id of the contact membership to be deleted.
*
* @return array api result
* {@getfields membership_delete}
* This API is used for creating a Membership for a contact.
* Required parameters : membership_type_id and status_id.
*
- * @param array $params an associative array of name/value property values of civicrm_membership
+ * @param array $params
+ * An associative array of name/value property values of civicrm_membership.
*
* @return array of newly created membership property values.
* {@getfields membership_create}
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_membership_create_spec(&$params) {
$params['contact_id']['api.required'] = 1;
* Adjust Metadata for Get action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_membership_get_spec(&$params) {
$params['membership_type_id']['api.aliases'] = array('membership_type');
* This api will return the membership records for the contacts
* having membership based on the relationship with the direct members.
*
- * @param Array $params key/value pairs for contact_id and some
+ * @param Array $params
+ * Key/value pairs for contact_id and some.
* options affecting the desired results; has legacy support
* for just passing the contact_id itself as the argument
*
* is passed in as part of the reasonable expectation developers have that we will keep the api
* as stable as possible
*
- * @param array $params parameters passed into get function
+ * @param array $params
+ * Parameters passed into get function.
* @param int $membershipTypeId
* @param $activeOnly
*
/**
* non-standard behaviour inherited from v2
*
- * @param array $params parameters passed into get function
+ * @param array $params
+ * Parameters passed into get function.
* @param $membershipValues
* @param int $contactID
*
/**
* API to Create or update a Membership Type
*
- * @param array$params an associative array of name/value property values of civicrm_membership_block
+ * @param array$params
+ * An associative array of name/value property values of civicrm_membership_block.
*
* @return array $result newly created or updated membership type property values.
* @access public
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_membership_block_create_spec(&$params) {
$params['is_active']['api.default'] = TRUE;
*
* This api is used for finding an existing membership type.
*
- * @param array $params an associative array of name/value property values of civicrm_membership_block
+ * @param array $params
+ * An associative array of name/value property values of civicrm_membership_block.
* {getfields MembershipBlock_get}
*
* @return array api result array of all found membership block property values.
* This API is used for deleting a membership type
* Required parameters : id of a membership type
*
- * @param array $params
+ * @param array $params
*
* @return array api result array
* @access public
/**
* Add or update a link between contribution and membership
*
- * @param array $params (reference ) input parameters
+ * @param array $params
+ * (reference ) input parameters.
*
* @return array (reference ) membership_payment_id of created or updated record
* {@getfields MembershipPayment_create}
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_membership_payment_create_spec(&$params) {
$params['membership_id']['api.required'] = 1;
* Retrieve one / all contribution(s) / membership(s) linked to a
* membership / contrbution.
*
- * @param array $params input parameters
+ * @param array $params
+ * Input parameters.
*
* @return array array of properties, if error an array with an error id and error message
* @example MembershipPaymentGet
*
* This API is used for creating a Membership Status
*
- * @param array $params an associative array of name/value property values of civicrm_membership_status
+ * @param array $params
+ * An associative array of name/value property values of civicrm_membership_status.
*
* @return array of newly created membership status property values.
* {@getfields MembershipStatus_create}
*
* This api is used for finding an existing membership status.
*
- * @param array $params an associative array of name/value property values of civicrm_membership_status
+ * @param array $params
+ * An associative array of name/value property values of civicrm_membership_status.
*
* @return Array of all found membership status property values.
* {@getfields MembershipStatus_get}
* This api is used for updating an existing membership status.
* Required parameters : id of a membership status
*
- * @param Array $params an associative array of name/value property values of civicrm_membership_status
+ * @param Array $params
+ * An associative array of name/value property values of civicrm_membership_status.
* @deprecated - should just use create
*
* @return array of updated membership status property values
*
* This API is used for deleting a membership status
*
- * @param array Params array containing 'id' - Id of the membership status to be deleted
+ * @param array Params array containing 'id' - Id of the membership status to be deleted
* {@getfields MembershipStatus_delete}
*
* @return array i
/**
* API to Create or update a Membership Type
*
- * @param array $params an associative array of name/value property values of civicrm_membership_type
+ * @param array $params
+ * An associative array of name/value property values of civicrm_membership_type.
*
* @return array $result newly created or updated membership type property values.
* @access public
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_membership_type_create_spec(&$params) {
// todo could set default here probably
*
* This api is used for finding an existing membership type.
*
- * @param array $params an associative array of name/value property values of civicrm_membership_type
+ * @param array $params
+ * An associative array of name/value property values of civicrm_membership_type.
* {getfields MembershipType_get}
*
* @return Array of all found membership type property values.
* This API is used for deleting a membership type
* Required parameters : id of a membership type
*
- * @param array $params
+ * @param array $params
*
* @return boolean true if success, else false
* @access public
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_message_template_create_spec(&$params) {
$params['msg_title']['api.required'] = 1;
}
/**
- * @param array $params
+ * @param array $params
*
* @return boolean | error true if successfull, error otherwise
* {@getfields message_template_delete}
/**
* Retrieve one or more message_template
*
- * @param array input parameters
+ * @param array input parameters
*
*
* @example SepaCreditorGet.php Standard Get Example
*
- * @param array $params an associative array of name/value pairs.
+ * @param array $params
+ * An associative array of name/value pairs.
*
* @return array api result array
* {@getfields message_template_get}
* The metadata is used for setting defaults, documentation &
* validation.
*
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_message_template_send_spec(&$params) {
$params['messageTemplateID']['api.required'] = 1;
* This API is used for creating a note.
* Required parameters : entity_id AND note
*
- * @param array $params an associative array of name/value property values of civicrm_note
+ * @param array $params
+ * An associative array of name/value property values of civicrm_note.
* {@getfields note_create}
*
* @return array API result array
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_note_create_spec(&$params) {
$params['entity_table']['api.default'] = "civicrm_contact";
*
* This API is used for deleting a note
*
- * @param array $params including id of the note to be deleted
+ * @param array $params
+ * Including id of the note to be deleted.
* {@getfields note_delete}
*
* @return null
/**
* Retrieve a specific note, given a set of input params
*
- * @param array $params input parameters
+ * @param array $params
+ * Input parameters.
*
* @return array array of properties,
* if error an array with an error id and error message
* Adjust Metadata for Get action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_note_get_spec(&$params) {
$params['entity_table']['api.default'] = "civicrm_contact";
/**
* Get all descendents of given note
*
- * @param array $params Associative array; only required 'id' parameter is used
+ * @param array $params
+ * Associative array; only required 'id' parameter is used.
*
* @return array Nested associative array beginning with direct children of given note.
*/
* In case of updating existing survey, id of that particular survey must
* be in $params array.
*
- * @param array $params (reference) Associative array of property
+ * @param array $params
+ * (reference) Associative array of property.
* name/value pairs to insert in new 'survey'
*
* @return array survey array
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_option_group_create_spec(&$params) {
$params['name']['api.unique'] = 1;
* This method is used to delete any existing Option Group. id of the group
* to be deleted is required field in $params array
*
- * @param array $params array containing id of the group
+ * @param array $params
+ * Array containing id of the group.
* to be deleted
*
* @return array API Result Array
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_option_value_create_spec(&$params) {
$params['is_active']['api.default'] = 1;
/**
* Deletes an existing OptionValue
*
- * @param array $params
+ * @param array $params
*
* {@example OptionValueDelete.php 0}
*
* Required parameters : event_id AND contact_id for new creation
* : participant as name/value with participantid for edit
*
- * @param array $params an associative array of name/value property values of civicrm_participant
+ * @param array $params
+ * An associative array of name/value property values of civicrm_participant.
*
* @return array apiresult
* {@getfields participant_create}
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_participant_create_spec(&$params) {
$params['status_id']['api.default'] = "1";
* If more than one matching participant exists, return an error, unless
* the client has requested to return the first found contact
*
- * @param array $params (reference ) input parameters
+ * @param array $params
+ * (reference ) input parameters.
*
* @return array (reference ) array of properties, if error an array with an error id and error message
* {@getfields participant_get}
* Adjust Metadata for Get action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_participant_get_spec(&$params) {
$params['participant_test']['api.default'] = 0;
*
* This API is used for deleting a contact participant
*
- * @param array $params Array containing Id of the contact participant to be deleted
+ * @param array $params
+ * Array containing Id of the contact participant to be deleted.
*
* {@getfields participant_delete}
* @throws Exception
* This API is used for creating a Participant Payment of Event.
* Required parameters : participant_id, contribution_id.
*
- * @param array $params an associative array of name/value property values of civicrm_participant_payment
+ * @param array $params
+ * An associative array of name/value property values of civicrm_participant_payment.
* @example ParticipantPaymentCreate.php
* {@example ParticipantPaymentCreate.php 0}
*
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_participant_payment_create_spec(&$params) {
$params['participant_id']['api.required'] = 1;
* Retrieve one / all contribution(s) / participant(s) linked to a
* contribution.
*
- * @param array $params input parameters
+ * @param array $params
+ * Input parameters.
*
* @return array array of properties, if error an array with an error id and error message
* @example ParticipantPaymentGet
* In case of updating existing participant_status, id of that particular participant_status must
* be in $params array.
*
- * @param array $params Associative array of property
+ * @param array $params
+ * Associative array of property.
* name/value pairs to insert in new 'participant_status'
*
* @return array participant_status array
/**
* Returns array of participant_statuses matching a set of one or more group properties
*
- * @param array $params Array of one or more valid
+ * @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
*
* This method is used to delete any existing participant_status. id of the group
* to be deleted is required field in $params array
*
- * @param array $params (reference) array containing id of the group
+ * @param array $params
+ * (reference) array containing id of the group.
* to be deleted
*
* @return array api result array
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_payment_processor_create_spec(&$params) {
$params['payment_processor_type_id']['api.required'] = 1;
/**
* Deletes an existing PaymentProcessor
*
- * @param array $params
+ * @param array $params
* {@getfields payment_processor_delete}
*
* @return array API result Array
/**
* Retrieve one or more PaymentProcessor
*
- * @param mixed[] (reference) input parameters
+ * @param mixed[] (reference) input parameters
* {@getfields payment_processor_get}
- * @param array $params an associative array of name/value pairs.
+ * @param array $params
+ * An associative array of name/value pairs.
*
* @return array details of found PaymentProcessor
* @access public
/**
* create payment_processor type
*
- * @param array $params Associative array of property name/value pairs to insert in new payment_processor type.
+ * @param array $params
+ * Associative array of property name/value pairs to insert in new payment_processor type.
*
* @return Newly created PaymentProcessor_type object
* {@getfields PaymentProcessorType_create}
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_payment_processor_type_create_spec(&$params) {
$params['billing_mode']['api.required'] = 1;
/**
* Delete a payment_processor type delete
*
- * @param id of payment_processor type $id
+ * @param id of payment_processor type $id
*
* @return array API Result Array
* {@getfields PaymentProcessorType_delete}
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_phone_create_spec(&$params) {
$params['contact_id']['api.required'] = 1;
/**
* Deletes an existing Phone
*
- * @param array $params
+ * @param array $params
*
* @return array Api Result
* {@getfields phone_delete}
/**
* Retrieve one or more phones
*
- * @param mixed[] (reference ) input parameters
+ * @param mixed[] (reference ) input parameters
*
* {@schema Core/Phone.xml}
* {@example PhoneDelete.php 0}
- * @param array $params an associative array of name/value pairs.
+ * @param array $params
+ * An associative array of name/value pairs.
*
* @return array details of found phones else error
* @access public
/**
* Creates or updates an Activity. See the example for usage
*
- * @param array $params Associative array of property name/value
+ * @param array $params
+ * Associative array of property name/value.
* pairs for the activity.
* {@getfields pledge_create}
*
/**
* Delete a pledge
*
- * @param array $params array included 'pledge_id' of pledge to delete
+ * @param array $params
+ * Array included 'pledge_id' of pledge to delete.
*
* @return boolean true if success, else false
* @static void
/**
* Retrieve a set of pledges, given a set of input params
*
- * @param array $params input parameters. Use interrogate for possible fields
+ * @param array $params
+ * Input parameters. Use interrogate for possible fields.
*
* @return array array of pledges, if error an array with an error id and error message
* {@getfields pledge_get}
* 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
*
- * @param array $values The reformatted properties that we can use internally
+ * @param array $values
+ * The reformatted properties that we can use internally.
* @param bool $create
*
* @return array|CRM_Error
* @todo possibly add ability to add payment if there are less payments than pledge installments
* @todo possibly add ability to recalculate dates if the schedule is changed
*
- * @param array $params input parameters
+ * @param array $params
+ * Input parameters.
* {@getfields PledgePayment_create}
* @example PledgePaymentCreate.php
*
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_pledge_payment_create_spec(&$params) {
$params['pledge_id']['api.required'] = 1;
/**
* Delete a pledge Payment - Note this deletes the contribution not just the link
*
- * @param array $params input parameters
+ * @param array $params
+ * Input parameters.
* {@getfields PledgePayment_delete}
* @example PledgePaymentDelete.php
*
/**
* Retrieve a set of pledges, given a set of input params
*
- * @param array $params input parameters
+ * @param array $params
+ * Input parameters.
* {@getfields PledgePayment_get}
* @example PledgePaymentGet.php *
*
/**
* Create or update a price_field
*
- * @param array $params Associative array of property
+ * @param array $params
+ * Associative array of property.
* name/value pairs to insert in new 'price_field'
* @example PriceFieldCreate.php Std Create example
*
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_price_field_create_spec(&$params) {
$params['label']['api.required'] = TRUE;
/**
* 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
+ * @param array $params
+ * Array of one or more valid property_name=>value pairs. If $params is set.
* as null, all price_fields will be returned (default limit is 25)
*
* @return array Array of matching price_fields
* This method is used to delete any existing price_field. id of the group
* to be deleted is required field in $params array
*
- * @param array $params array containing id of the group
+ * @param array $params
+ * Array containing id of the group.
* to be deleted
*
* @return array API result array
/**
* Create or update a price_field_value
*
- * @param array $params Associative array of property
+ * @param array $params
+ * Associative array of property.
* name/value pairs to insert in new 'price_field_value'
* @example PriceFieldValueCreate.php Std Create example
*
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_price_field_value_create_spec(&$params) {
$params['price_field_id']['api.required'] = TRUE;
/**
* Returns array of price_field_values 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
+ * @param array $params
+ * Array of one or more valid property_name=>value pairs. If $params is set.
* as null, all price_field_values will be returned (default limit is 25)
*
* @return array Array of matching price_field_values
* This method is used to delete any existing price_field_value. id of the group
* to be deleted is required field in $params array
*
- * @param array $params array containing id of the group
+ * @param array $params
+ * Array containing id of the group.
* to be deleted
*
* @return array API result array
/**
* Create or update a price_set
*
- * @param array $params Associative array of property
+ * @param array $params
+ * Associative array of property.
* name/value pairs to insert in new 'price_set'
* @example PriceSetCreate.php Std Create example
*
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_price_set_create_spec(&$params) {
$params['title']['api.required'] = TRUE;
/**
* 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
+ * @param array $params
+ * Array of one or more valid property_name=>value pairs. If $params is set.
* as null, all price_sets will be returned (default limit is 25)
*
* @return array Array of matching price_sets
* This method is used to delete any existing price_set. id of the group
* to be deleted is required field in $params array
*
- * @param array $params array containing id of the group
+ * @param array $params
+ * Array containing id of the group.
* to be deleted
*
* @return array API result array
/**
* Retrieve Profile field values.
*
- * @param array $params Associative array of property name/value
+ * @param array $params
+ * Associative array of property name/value.
* pairs to get profile field values
*
* @throws API_Exception
* so we accept 'email-primary' but pass 'email-Primary' to the BAO
* we could make the BAO handle email-primary but this would alter the fieldname seen by hooks
* & we would need to consider that change
- * @param string $fieldName API field name
+ * @param string $fieldName
+ * API field name.
*
* @return string BAO Field Name
*/
* use submit
* Update Profile field values.
*
- * @param array $params Associative array of property name/value
+ * @param array $params
+ * Associative array of property name/value.
* pairs to update profile field values
*
* @return array Updated Contact/ Activity object|CRM_Error
* @deprecated - appears to be an internal function - should not be accessible via api
* Provide formatted values for profile fields.
*
- * @param array $params Associative array of property name/value
+ * @param array $params
+ * Associative array of property name/value.
* pairs to profile field values
*
* @throws API_Exception
* & participant has 'participant_status' so we have to standardise from the outside in here -
* find the oddities, 'mask them' at this layer, add tests & work to standardise over time so we can remove this handling
*
- * @param integer $profileID
- * @param integer $optionsBehaviour 0 = don't resolve, 1 = resolve non-aggressively, 2 = resolve aggressively - ie include country & state
+ * @param int $profileID
+ * @param int $optionsBehaviour
+ * 0 = don't resolve, 1 = resolve non-aggressively, 2 = resolve aggressively - ie include country & state.
* @param $is_flush
*
* @return
/**
* Add or update a relationship
*
- * @param array $params input parameters
+ * @param array $params
+ * Input parameters.
*
* @throws API_Exception
* @example RelationshipCreate.php Std Create example
/**
* Adjust Metadata for Create action
*
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_relationship_create_spec(&$params) {
$params['contact_id_a']['api.required'] = 1;
/**
* Delete a relationship
*
- * @param array $params
+ * @param array $params
*
* @return array API Result Array
* {@getfields relationship_delete}
/**
* get the relationship
*
- * @param array $params input parameters.
+ * @param array $params
+ * Input parameters.
* @todo Result is inconsistent depending on whether contact_id is passed in :
* - if you pass in contact_id - it just returns all relationships for 'contact_id'
* - if you don't pass in contact_id then it does a filter on the relationship table (DAO based search)
/**
* legacy handling for relationship_type parameter
*
- * @param array $params Associative array of property name/value
- * pairs to insert in new contact.
+ * @param array $params
+ * Associative array of property name/value.
+ * pairs to insert in new contact.
*/
function _civicrm_api3_handle_relationship_type(&$params) {
if (empty($params['relationship_type_id']) && !empty($params['relationship_type'])) {
/**
* create relationship type
*
- * @param array $params Associative array of property name/value pairs to insert in new relationship type.
+ * @param array $params
+ * Associative array of property name/value pairs to insert in new relationship type.
*
* @return Newly created Relationship_type object
* {@getfields RelationshipType_create}
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_relationship_type_create_spec(&$params) {
$params['contact_type_a']['api.required'] = 1;
/**
* Delete a relationship type delete
*
- * @param id of relationship type $id
+ * @param id of relationship type $id
*
* @return array API Result Array
* {@getfields RelationshipType_delete}
/**
* Retrieve a report instance
*
- * @param array $params input parameters
+ * @param array $params
+ * Input parameters.
*
* @return array details of found instances
* @access public
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_report_instance_create_spec(&$params) {
$params['report_id']['api.required'] = 1;
/**
* Deletes an existing ReportInstance
*
- * @param array $params
+ * @param array $params
*
* @return array Api result
* @access public
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_report_template_create_spec(&$params) {
require_once 'api/v3/OptionValue.php';
/**
* Deletes an existing ReportTemplate
*
- * @param array $params
+ * @param array $params
*
* {@example ReportTemplateDelete.php 0}
*
/**
* Retrieve rows from a report template
*
- * @param array $params input parameters
+ * @param array $params
+ * Input parameters.
*
* @return array details of found instances
* @access public
/**
* Retrieve rows from a report template
*
- * @param array $params input parameters
+ * @param array $params
+ * Input parameters.
*
* @return array details of found instances
* @access public
/**
* Metadata for setting create function
*
- * @param array $params parameters as passed to the API
+ * @param array $params
+ * Parameters as passed to the API.
*/
function _civicrm_api3_setting_getdefaults_spec(&$params) {
$params['domain_id'] = array(
/**
* Create or update a setting
*
- * @param array $params Associative array of setting
+ * @param array $params
+ * Associative array of setting.
* name/value pairs + other vars as applicable - see getfields for more
* @example SettingCreate.php Std Create example
*
/**
* Metadata for setting create function
*
- * @param array $params parameters as passed to the API
+ * @param array $params
+ * Parameters as passed to the API.
*/
function _civicrm_api3_setting_create_spec(&$params) {
$params['domain_id'] = array(
/**
* Returns array of settings matching input parameters
*
- * @param array $params Array of one or more valid
+ * @param array $params
+ * Array of one or more valid.
* property_name=>value pairs.
*
* @return array Array of matching settings
/**
* Metadata for setting create function
*
- * @param array $params parameters as passed to the API
+ * @param array $params
+ * Parameters as passed to the API.
*/
function _civicrm_api3_setting_get_spec(&$params) {
$params['domain_id'] = array(
* Returns value for specific parameter. Function requires more fields than 'get' but is intended for
* runtime usage & should be quicker
*
- * @param array $params (reference) Array of one or more valid
+ * @param array $params
+ * (reference) Array of one or more valid.
* property_name=>value pairs.
*
* @return array Array of matching settings
/**
* Metadata for setting create function
*
- * @param array $params parameters as passed to the API
+ * @param array $params
+ * Parameters as passed to the API.
*/
function _civicrm_api3_setting_getvalue_spec(&$params) {
/**
* Create or update a survey
*
- * @param array $params Associative array of property
+ * @param array $params
+ * Associative array of property.
* name/value pairs to insert in new 'survey'
* @example SurveyCreate.php Std Create example
*
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or 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
+ * @param array $params
+ * Array of one or more valid.
* property_name=>value pairs. If $params is set
* as null, all surveys will be returned
*
* This method is used to delete any existing survey. id of the group
* to be deleted is required field in $params array
*
- * @param array $params array containing id of the group
+ * @param array $params
+ * Array containing id of the group.
* to be deleted
*
* @return array api result array
/**
* Get the list of signatories
*
- * @param array $params (reference ) input parameters
+ * @param array $params
+ * (reference ) input parameters.
*
* @return array (reference ) contribution_id of created or updated record
* @static void
/**
* Flush all system caches
*
- * @param array $params input parameters
+ * @param array $params
+ * Input parameters.
* - triggers: bool, whether to drop/create SQL triggers; default: FALSE
* - session: bool, whether to reset the CiviCRM session data; defaul: FALSE
*
* Adjust Metadata for Flush action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_system_flush_spec(&$params){
$params['triggers'] = array('title' => 'rebuild triggers (boolean)');
* System.Check API specification (optional)
* This is used for documentation and validation.
*
- * @param array $spec description of fields supported by this API call
+ * @param array $spec
+ * Description of fields supported by this API call.
* @return void
* @see http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
*/
/**
* Deletes an existing Tag
*
- * @param array $params
+ * @param array $params
*
* @example TagDelete.ph
*
*
* @example TagGet.php
*
- * @param array $params an associative array of name/value pairs.
+ * @param array $params
+ * An associative array of name/value pairs.
*
* @return array details of found tags else error
* {@getfields tag_get}
/**
* Defines 'uf field' within a group.
*
- * @param $params array Associative array of property name/value pairs to create new uf field.
+ * @param $params
+ * Array Associative array of property name/value pairs to create new uf field.
*
* @throws API_Exception
*
/**
* Returns array of uf groups (profiles) matching a set of one or more group properties
*
- * @param array $params (reference) Array of one or more valid
+ * @param array $params
+ * (reference) Array of one or more valid.
* property_name=>value pairs. If $params is set
* as null, all surveys will be returned
*
/**
* Use this API to create a new group. See the CRM Data Model for uf_group property definitions
*
- * @param $params array Associative array of property name/value pairs to insert in group.
+ * @param $params
+ * Array Associative array of property name/value pairs to insert in group.
*
* @return array API result array
* {@getfields UFGroup_create}
/**
* Returns array of uf groups (profiles) matching a set of one or more group properties
*
- * @param array $params (reference) Array of one or more valid
+ * @param array $params
+ * (reference) Array of one or more valid.
* property_name=>value pairs. If $params is set
* as null, all surveys will be returned
*
/**
* takes an associative array and creates a uf join in the database
*
- * @param array $params assoc array of name/value pairs
+ * @param array $params
+ * Assoc array of name/value pairs.
*
* @return array CRM_Core_DAO_UFJoin Array
* @access public
/**
* Adjust Metadata for Create action
*
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
* @todo - suspect module, weight don't need to be required - need to test
*/
function _civicrm_api3_uf_join_create_spec(&$params) {
/**
* Get CiviCRM UF_Joins (ie joins between CMS user records & CiviCRM user record
*
- * @param array $params (reference) an assoc array of name/value pairs
+ * @param array $params
+ * (reference) an assoc array of name/value pairs.
*
* @return array $result CiviCRM Result Array or null
* @todo Delete function missing
/**
* Create or update a UF Match record
*
- * @param array $params Associative array of property
+ * @param array $params
+ * Associative array of property.
* name/value pairs to insert in new 'survey'
* @example UFMatch.php Std Create example
*
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_uf_match_create_spec(&$params) {
$params['contact_id']['api.required'] = 1;
/**
* Create or update a survey
*
- * @param array $params Associative array of property
+ * @param array $params
+ * Associative array of property.
* name/value pairs to insert in new 'survey'
* @example UFMatch.php Std Create example
*
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_website_create_spec(&$params) {
$params['contact_id']['api.required'] = 1;
/**
* Deletes an existing Website
*
- * @param array $params
+ * @param array $params
* {@getfields website_delete}
* @example WebsiteDelete.php Std Delete Example
*
/**
* Retrieve one or more websites
*
- * @param mixed[] (reference ) input parameters
+ * @param mixed[] (reference ) input parameters
* {@getfields website_get}
* {@example WebsiteGet.php 0}
* @example WebsiteGet.php
- * @param array $params an associative array of name/value pairs.
+ * @param array $params
+ * An associative array of name/value pairs.
*
* @return array details of found websites
*
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_word_replacement_create_spec(&$params) {
unset($params['version']);
* delete an existing word_replacement
*
*
- * @param array $params array containing id of the word_replacement
+ * @param array $params
+ * Array containing id of the word_replacement.
* to be deleted
*
* @return array api result array
/**
* Wrapper Function for civicrm_verify_mandatory to make it simple to pass either / or fields for checking
*
- * @param array $params array of fields to check
- * @param array $daoName string DAO to check for required fields (create functions only)
- * @param array $keyoptions list of required fields options. One of the options is required
+ * @param array $params
+ * Array of fields to check.
+ * @param array $daoName
+ * String DAO to check for required fields (create functions only).
+ * @param array $keyoptions
+ * List of required fields options. One of the options is required.
*
* @return null or throws error if there the required fields not present
* @
/**
* check mandatory fields are included
*
- * @param array $params array of fields to check
- * @param array $daoName string DAO to check for required fields (create functions only)
- * @param array $keys list of required fields. A value can be an array denoting that either this or that is required.
+ * @param array $params
+ * Array of fields to check.
+ * @param array $daoName
+ * String DAO to check for required fields (create functions only).
+ * @param array $keys
+ * List of required fields. A value can be an array denoting that either this or that is required.
* @param bool $verifyDAO
*
* @throws API_Exception
* Format array in result output styple
*
* @param array|int $values values generated by API operation (the result)
- * @param array $params parameters passed into API call
- * @param string $entity the entity being acted on
- * @param string $action the action passed to the API
- * @param object $dao DAO object to be freed here
- * @param array $extraReturnValues additional values to be added to top level of result array(
+ * @param array $params
+ * Parameters passed into API call.
+ * @param string $entity
+ * The entity being acted on.
+ * @param string $action
+ * The action passed to the API.
+ * @param object $dao
+ * DAO object to be freed here.
+ * @param array $extraReturnValues
+ * Additional values to be added to top level of result array(.
* - this param is currently used for legacy behaviour support
*
* @return array $result
/**
* return the DAO of the function or Entity
- * @param String $name either a function of the api (civicrm_{entity}_create or the entity name
+ * @param string $name
+ * Either a function of the api (civicrm_{entity}_create or the entity name.
* return the DAO name to manipulate this function
* eg. "civicrm_api3_contact_create" or "Contact" will return "CRM_Contact_BAO_Contact"
* @return mixed|string
/**
* return the DAO of the function or Entity
- * @param String $name is either a function of the api (civicrm_{entity}_create or the entity name
+ * @param string $name
+ * Is either a function of the api (civicrm_{entity}_create or the entity name.
* return the DAO name to manipulate this function
* eg. "civicrm_contact_create" or "Contact" will return "CRM_Contact_BAO_Contact"
* @return mixed
* * Ideally this would be merged with _civicrm_get_query_object but we need to resolve differences in what the
* 2 variants call
* @param $entity
- * @param array $params as passed into api get or getcount function
- * @param array $additional_options array of options (so we can modify the filter)
- * @param bool $getCount are we just after the count
+ * @param array $params
+ * As passed into api get or getcount function.
+ * @param array $additional_options
+ * Array of options (so we can modify the filter).
+ * @param bool $getCount
+ * Are we just after the count.
*
* @return
*/
/**
* Apply filters (e.g. high, low) to DAO object (prior to find)
- * @param string $filterField field name of filter
- * @param string $filterValue field value of filter
- * @param object $dao DAO object
+ * @param string $filterField
+ * Field name of filter.
+ * @param string $filterValue
+ * Field value of filter.
+ * @param object $dao
+ * DAO object.
*/
function _civicrm_api3_apply_filters_to_dao($filterField, $filterValue, &$dao) {
if (strstr($filterField, 'high')) {
* Get sort, limit etc options from the params - supporting old & new formats.
* get returnproperties for legacy
*
- * @param array $params params array as passed into civicrm_api
- * @param bool $queryObject - is this supporting a queryobject api (e.g contact) - if so we support more options
+ * @param array $params
+ * Params array as passed into civicrm_api.
+ * @param bool $queryObject
+ * Is this supporting a queryobject api (e.g contact) - if so we support more options.
* for legacy report & return a unique fields array
*
* @param string $entity
/**
* Apply options (e.g. sort, limit, order by) to DAO object (prior to find)
*
- * @param array $params params array as passed into civicrm_api
- * @param object $dao DAO object
+ * @param array $params
+ * Params array as passed into civicrm_api.
+ * @param object $dao
+ * DAO object.
* @param $entity
*/
function _civicrm_api3_apply_options_to_dao(&$params, &$dao, $entity) {
/**
* Converts an DAO object to an array
*
- * @param CRM_Core_DAO $dao object to convert
+ * @param CRM_Core_DAO $dao
+ * Object to convert.
* @param array $params
* @param bool $uniqueFields
* @param string $entity
* @todo filter so only required fields are queried
*
* @param array $params
- * @param string $entity - entity name in CamelCase
+ * @param string $entity
+ * Entity name in CamelCase.
*
* @return bool
*/
/**
* Converts an object to an array
*
- * @param object $dao (reference) object to convert
- * @param array $values (reference) array
+ * @param object $dao
+ * (reference) object to convert.
+ * @param array $values
+ * (reference) array.
* @param array|bool $uniqueFields
*
* @return array
*
* @param array $params
* @param array $values
- * @param string $extends entity that this custom field extends (e.g. contribution, event, contact)
- * @param string $entityId ID of entity per $extends
+ * @param string $extends
+ * Entity that this custom field extends (e.g. contribution, event, contact).
+ * @param string $entityId
+ * ID of entity per $extends.
*/
function _civicrm_api3_custom_format_params($params, &$values, $extends, $entityId = NULL) {
$values['custom'] = array();
* api level. Hence the intention is to remove this function
* & the associated param from viery_mandatory
*
- * @param array $params Associative array of property name/value
+ * @param array $params
+ * Associative array of property name/value.
* pairs to insert in new history.
* @param string $daoName
* @param bool $return
/**
* Function to do a 'standard' api get - when the api is only doing a $bao->find then use this
*
- * @param string $bao_name name of BAO
- * @param array $params params from api
- * @param bool $returnAsSuccess return in api success format
+ * @param string $bao_name
+ * Name of BAO.
+ * @param array $params
+ * Params from api.
+ * @param bool $returnAsSuccess
+ * Return in api success format.
* @param string $entity
*
* @return array
/**
* Function to do a 'standard' api create - when the api is only doing a $bao::create then use this
*
- * @param string $bao_name Name of BAO Class
- * @param array $params parameters passed into the api call
- * @param string $entity Entity - pass in if entity is non-standard & required $ids array
+ * @param string $bao_name
+ * Name of BAO Class.
+ * @param array $params
+ * Parameters passed into the api call.
+ * @param string $entity
+ * Entity - pass in if entity is non-standard & required $ids array.
*
* @throws API_Exception
* @return array
* Get custom data for the given entity & Add it to the returnArray as 'custom_123' = 'custom string' AND 'custom_123_1' = 'custom string'
* Where 123 is field value & 1 is the id within the custom group data table (value ID)
*
- * @param array $returnArray - array to append custom data too - generally $result[4] where 4 is the entity id.
- * @param string $entity e.g membership, event
+ * @param array $returnArray
+ * Array to append custom data too - generally $result[4] where 4 is the entity id.
+ * @param string $entity
+ * E.g membership, event.
* @param int $entity_id
- * @param int $groupID - per CRM_Core_BAO_CustomGroup::getTree
- * @param int $subType e.g. membership_type_id where custom data doesn't apply to all membership types
- * @param string $subName - Subtype of entity
+ * @param int $groupID
+ * Per CRM_Core_BAO_CustomGroup::getTree.
+ * @param int $subType
+ * E.g. membership_type_id where custom data doesn't apply to all membership types.
+ * @param string $subName
+ * Subtype of entity.
*/
function _civicrm_api3_custom_data_get(&$returnArray, $entity, $entity_id, $groupID = NULL, $subType = NULL, $subName = NULL) {
$groupTree = CRM_Core_BAO_CustomGroup::getTree($entity,
* As of writing only date was implemented.
* @param string $entity
* @param string $action
- * @param array $params -
- * @param array $fields response from getfields all variables are the same as per civicrm_api
- * @param bool $errorMode errorMode do intensive post fail checks?
+ * @param array $params
+ * -.
+ * @param array $fields
+ * Response from getfields all variables are the same as per civicrm_api.
+ * @param bool $errorMode
+ * ErrorMode do intensive post fail checks?.
* @throws Exception
*/
function _civicrm_api3_validate_fields($entity, $action, &$params, $fields, $errorMode = False) {
* It also checks against the RULE:date function. This is a centralisation of code that was scattered and
* may not be the best thing to do. There is no code level documentation on the existing functions to work off
*
- * @param array $params params from civicrm_api
- * @param string $fieldName uniquename of field being checked
- * @param array $fieldInfo array of fields from getfields function
+ * @param array $params
+ * Params from civicrm_api.
+ * @param string $fieldName
+ * Uniquename of field being checked.
+ * @param array $fieldInfo
+ * Array of fields from getfields function.
* @throws Exception
*/
function _civicrm_api3_validate_date(&$params, &$fieldName, &$fieldInfo) {
/**
* Validate foreign constraint fields being passed into API.
*
- * @param array $params params from civicrm_api
- * @param string $fieldName uniquename of field being checked
- * @param array $fieldInfo array of fields from getfields function
+ * @param array $params
+ * Params from civicrm_api.
+ * @param string $fieldName
+ * Uniquename of field being checked.
+ * @param array $fieldInfo
+ * Array of fields from getfields function.
* @throws Exception
*/
function _civicrm_api3_validate_constraint(&$params, &$fieldName, &$fieldInfo) {
/**
* Validate foreign constraint fields being passed into API.
*
- * @param array $params params from civicrm_api
- * @param string $fieldName uniquename of field being checked
- * @param $fieldInfo array of fields from getfields function
+ * @param array $params
+ * Params from civicrm_api.
+ * @param string $fieldName
+ * Uniquename of field being checked.
+ * @param $fieldInfo
+ * Array of fields from getfields function.
* @throws Exception
*/
function _civicrm_api3_validate_uniquekey(&$params, &$fieldName, &$fieldInfo) {
* Note: This will verify that 'values' is present, but it does not directly verify
* any other parameters.
*
- * @param string $entity entity name
- * @param array $params params from civicrm_api, including:
+ * @param string $entity
+ * Entity name.
+ * @param array $params
+ * Params from civicrm_api, including:.
* - 'values': an array of records to save
* - all other items: keys which identify new/pre-existing records
* @return array|int
/**
* returns fields allowable by api
*
- * @param $entity string Entity to query
- * @param bool $unique index by unique fields?
+ * @param $entity
+ * String Entity to query.
+ * @param bool $unique
+ * Index by unique fields?.
* @param array $params
*
* @return array
* Validate integer fields being passed into API.
* It currently converts the incoming value 'user_contact_id' into the id of the currently logged in user
*
- * @param array $params params from civicrm_api
- * @param string $fieldName uniquename of field being checked
- * @param array $fieldInfo array of fields from getfields function
+ * @param array $params
+ * Params from civicrm_api.
+ * @param string $fieldName
+ * Uniquename of field being checked.
+ * @param array $fieldInfo
+ * Array of fields from getfields function.
* @param string $entity
* @throws API_Exception
*/
/**
* Determine a contact ID using a string expression
*
- * @param string $contactIdExpr e.g. "user_contact_id" or "@user:username"
+ * @param string $contactIdExpr
+ * E.g. "user_contact_id" or "@user:username".
* @return int|NULL|'unknown-user'
*/
function _civicrm_api3_resolve_contactID($contactIdExpr) {
/**
* Validate string fields being passed into API.
- * @param array $params params from civicrm_api
- * @param string $fieldName uniquename of field being checked
- * @param array $fieldInfo array of fields from getfields function
+ * @param array $params
+ * Params from civicrm_api.
+ * @param string $fieldName
+ * Uniquename of field being checked.
+ * @param array $fieldInfo
+ * Array of fields from getfields function.
* @param string $entity
* @throws API_Exception
* @throws Exception
/**
* Returns the canonical name of a field
*
- * @param $entity : api entity name (string should already be standardized - no camelCase)
- * @param $fieldName : any variation of a field's name (name, unique_name, api.alias)
+ * @param $entity
+ * : api entity name (string should already be standardized - no camelCase).
+ * @param $fieldName
+ * : any variation of a field's name (name, unique_name, api.alias).
*
* @return bool|string (string|bool) fieldName or FALSE if the field does not exist
*/