From 11e09c59b8b15670d5b6eddf8d90aaf465472c54 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Wed, 13 Mar 2013 05:10:20 -0400 Subject: [PATCH] Fix doc-comment formatting --- api/Exception.php | 3 +- api/api.php | 11 ++--- api/v3/Activity.php | 3 +- api/v3/ActivityType.php | 3 +- api/v3/Address.php | 2 +- api/v3/Campaign.php | 3 +- api/v3/Case.php | 9 ++-- api/v3/Contact.php | 7 +-- api/v3/Contribution.php | 11 +++-- api/v3/ContributionPage.php | 3 +- api/v3/ContributionRecur.php | 3 +- api/v3/CustomField.php | 5 ++- api/v3/CustomGroup.php | 2 +- api/v3/CustomSearch.php | 2 +- api/v3/CustomValue.php | 24 +++++------ api/v3/Domain.php | 6 ++- api/v3/Email.php | 3 +- api/v3/EntityTag.php | 6 ++- api/v3/Event.php | 22 ++++++---- api/v3/Generic.php | 2 +- api/v3/Grant.php | 3 +- api/v3/Group.php | 3 +- api/v3/GroupContact.php | 9 ++-- api/v3/GroupNesting.php | 3 +- api/v3/GroupOrganization.php | 2 +- api/v3/Im.php | 3 +- api/v3/LineItem.php | 3 +- api/v3/LocationType.php | 7 +-- api/v3/MailSettings.php | 3 +- api/v3/Mailing.php | 40 +++++++++--------- api/v3/MailingEventConfirm.php | 3 +- api/v3/MailingEventResubscribe.php | 3 +- api/v3/MailingEventSubscribe.php | 3 +- api/v3/MailingEventUnsubscribe.php | 3 +- api/v3/MailingJob.php | 10 ++--- api/v3/Membership.php | 8 ++-- api/v3/MembershipPayment.php | 3 +- api/v3/MembershipStatus.php | 10 ++--- api/v3/MembershipType.php | 3 +- api/v3/Note.php | 6 ++- api/v3/OptionGroup.php | 2 +- api/v3/OptionValue.php | 2 +- api/v3/Participant.php | 6 +-- api/v3/ParticipantPayment.php | 3 +- api/v3/Phone.php | 2 +- api/v3/Pledge.php | 7 +-- api/v3/PledgePayment.php | 5 ++- api/v3/PriceField.php | 3 +- api/v3/PriceFieldValue.php | 5 ++- api/v3/PriceSet.php | 2 +- api/v3/Profile.php | 2 +- api/v3/Relationship.php | 3 +- api/v3/RelationshipType.php | 3 +- api/v3/ReportTemplate.php | 2 +- api/v3/Setting.php | 55 +++++++++++++----------- api/v3/Survey.php | 3 +- api/v3/SurveyRespondant.php | 2 +- api/v3/System.php | 2 +- api/v3/Tag.php | 3 +- api/v3/UFJoin.php | 3 +- api/v3/UFMatch.php | 11 ++--- api/v3/Website.php | 4 +- api/v3/utils.php | 68 ++++++++++++++++-------------- 63 files changed, 257 insertions(+), 199 deletions(-) diff --git a/api/Exception.php b/api/Exception.php index dbc5110150..c19668f2db 100644 --- a/api/Exception.php +++ b/api/Exception.php @@ -8,7 +8,8 @@ * @copyright CiviCRM LLC (c) 2004-2013 */ -/* This api exception returns more information than the default one. The aim it let the api consumer know better what is exactly the error without having to parse the error message. +/** + * This api exception returns more information than the default one. The aim it let the api consumer know better what is exactly the error without having to parse the error message. * If you consume an api that doesn't return an error_code or the extra data you need, consider improving the api and contribute * @param string $message * the human friendly error message diff --git a/api/api.php b/api/api.php index 16b3e30391..212eb4b546 100644 --- a/api/api.php +++ b/api/api.php @@ -10,7 +10,7 @@ * @version $Id: api.php 30486 2010-11-02 16:12:09Z shot $ */ -/* +/** * @param string $entity * type of entities to deal with * @param string $action @@ -370,7 +370,7 @@ function _civicrm_api_get_camel_name($entity, $version = NULL) { return implode('', $fragments); } -/* +/** * Call any nested api calls */ function _civicrm_api_call_nested_api(&$params, &$result, $action, $entity, $version) { @@ -465,7 +465,7 @@ function _civicrm_api_call_nested_api(&$params, &$result, $action, $entity, $ver } } -/* +/** * Swap out any $values vars - ie. the value after $value is swapped for the parent $result * 'activity_type_id' => '$value.testfield', 'tag_id' => '$value.api.tag.create.id', @@ -507,7 +507,7 @@ function _civicrm_api_replace_variables($entity, $action, &$params, &$parentResu } } -/* +/** * 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 @@ -526,7 +526,8 @@ function _civicrm_api_get_entity_name_from_camel($entity) { } return $entity; } -/* + +/** * Having a DAO object find the entity name * @param object $bao DAO being passed in */ diff --git a/api/v3/Activity.php b/api/v3/Activity.php index 0df2ab4076..2fbc28da24 100644 --- a/api/v3/Activity.php +++ b/api/v3/Activity.php @@ -172,7 +172,8 @@ function civicrm_api3_activity_create($params) { return civicrm_api3_create_success($activityArray, $params, 'activity', 'get', $activityBAO); } } -/* + +/** * 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 diff --git a/api/v3/ActivityType.php b/api/v3/ActivityType.php index 27cf6886f2..6e0fb748d4 100644 --- a/api/v3/ActivityType.php +++ b/api/v3/ActivityType.php @@ -93,7 +93,8 @@ function civicrm_api3_activity_type_create($params) { _civicrm_api3_object_to_array($activityObject, $activityType[$activityObject->id]); return civicrm_api3_create_success($activityType, $params, 'activity_type', 'create'); } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/Address.php b/api/v3/Address.php index 5691671b66..1cad60f408 100644 --- a/api/v3/Address.php +++ b/api/v3/Address.php @@ -93,7 +93,7 @@ function civicrm_api3_address_create(&$params) { } } -/* +/** * Adjust Metadata for Create action * * @param array $params array or parameters determined by getfields diff --git a/api/v3/Campaign.php b/api/v3/Campaign.php index e86e224043..87789d730e 100644 --- a/api/v3/Campaign.php +++ b/api/v3/Campaign.php @@ -54,7 +54,8 @@ require_once 'CRM/Campaign/BAO/Campaign.php'; function civicrm_api3_campaign_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/Case.php b/api/v3/Case.php index 9866b7c35c..7e465b482d 100644 --- a/api/v3/Case.php +++ b/api/v3/Case.php @@ -127,7 +127,7 @@ function civicrm_api3_case_create($params) { return civicrm_api3_create_success($values, $params, 'case', 'create', $caseBAO); } -/* +/** * Adjust Metadata for Get Action * * @param array $params array or parameters determined by getfields @@ -137,7 +137,7 @@ function _civicrm_api3_case_get_spec(&$params) { $params['contact_id']['title'] = 'Case Client'; } -/* +/** * Adjust Metadata for Create Action * * @param array $params array or parameters determined by getfields @@ -149,7 +149,7 @@ function _civicrm_api3_case_create_spec(&$params) { $params['status_id']['api.default'] = 1; } -/* +/** * Adjust Metadata for Update action * * @param array $params array or parameters determined by getfields @@ -158,7 +158,7 @@ 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 @@ -167,7 +167,6 @@ function _civicrm_api3_case_delete_spec(&$params) { $params['id']['api.required'] = 1; } - /** * Get details of a particular case, or search for cases, depending on params * diff --git a/api/v3/Contact.php b/api/v3/Contact.php index 2efb02cff1..0b84bf2d27 100644 --- a/api/v3/Contact.php +++ b/api/v3/Contact.php @@ -130,7 +130,7 @@ function civicrm_api3_contact_create($params) { return civicrm_api3_create_success($values, $params, 'Contact', 'create'); } -/* +/** * Adjust Metadata for Create action * * @param array $params array or parameters determined by getfields @@ -189,7 +189,8 @@ function civicrm_api3_contact_getcount($params) { $count = _civicrm_api3_get_using_query_object('contact', $params, $options,1); return $count; } -/* + +/** * Adjust Metadata for Get action * * @param array $params array or parameters determined by getfields @@ -228,7 +229,7 @@ function _civicrm_api3_contact_get_spec(&$params) { $params['tag']['title'] = 'Assigned tags (filter, array)'; } -/* +/** * We are supporting 'showAll' = 'all', 'trash' or 'active' for contact get * and for getcount * - hopefully some day we'll come up with a std syntax for the 3-way-boolean of diff --git a/api/v3/Contribution.php b/api/v3/Contribution.php index b600c53bc8..71b42849ed 100644 --- a/api/v3/Contribution.php +++ b/api/v3/Contribution.php @@ -72,7 +72,8 @@ function civicrm_api3_contribution_create(&$params) { return civicrm_api3_create_success($contributeArray, $params, 'contribution', 'create', $contribution); } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation @@ -143,7 +144,8 @@ function civicrm_api3_contribution_delete($params) { return civicrm_api3_create_error('Could not delete contribution'); } } -/* + +/** * modify metadata. Legacy support for contribution_id */ function _civicrm_api3_contribution_delete_spec(&$params) { @@ -203,7 +205,8 @@ function civicrm_api3_contribution_get($params) { } return civicrm_api3_create_success($contribution, $params, 'contribution', 'get', $dao); } -/* + +/** * Adjust Metadata for Get action * * The metadata is used for setting defaults, documentation & validation @@ -360,7 +363,7 @@ function civicrm_api3_contribution_sendconfirmation($params) { $contribution->composeMessageArray($input, $ids, $cvalues, false, false); } -/* +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/ContributionPage.php b/api/v3/ContributionPage.php index bea4f580a9..d41f05c8e1 100644 --- a/api/v3/ContributionPage.php +++ b/api/v3/ContributionPage.php @@ -49,7 +49,8 @@ function civicrm_api3_contribution_page_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/ContributionRecur.php b/api/v3/ContributionRecur.php index b7d305b788..c15af33b0e 100644 --- a/api/v3/ContributionRecur.php +++ b/api/v3/ContributionRecur.php @@ -49,7 +49,8 @@ require_once 'CRM/Contribute/BAO/ContributionRecur.php'; function civicrm_api3_contribution_recur_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/CustomField.php b/api/v3/CustomField.php index 59cc79fc4e..233d1f7e84 100644 --- a/api/v3/CustomField.php +++ b/api/v3/CustomField.php @@ -95,7 +95,8 @@ function civicrm_api3_custom_field_create($params) { _civicrm_api3_object_to_array_unique_fields($customField, $values[$customField->id]); return civicrm_api3_create_success($values, $params, 'custom_field', $customField); } -/* + +/** * Adjust Metadata for Create action * * @param array $params array or parameters determined by getfields @@ -149,7 +150,7 @@ function civicrm_api3_custom_field_get($params) { * @return Array Validation errors */ -/* +/** * Helper function to validate custom field value * * @params String $fieldName Custom field name (eg: custom_8 ) diff --git a/api/v3/CustomGroup.php b/api/v3/CustomGroup.php index 3ac43d4ced..7f8097e67d 100644 --- a/api/v3/CustomGroup.php +++ b/api/v3/CustomGroup.php @@ -84,7 +84,7 @@ function civicrm_api3_custom_group_create($params) { return civicrm_api3_create_success($values, $params, 'custom_group', $customGroup); } -/* +/** * Adjust Metadata for Create action * * @param array $params array or parameters determined by getfields diff --git a/api/v3/CustomSearch.php b/api/v3/CustomSearch.php index a356722b01..fe36d0126c 100644 --- a/api/v3/CustomSearch.php +++ b/api/v3/CustomSearch.php @@ -45,7 +45,7 @@ function civicrm_api3_custom_search_create($params) { return civicrm_api3_option_value_create($params); } -/* +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/CustomValue.php b/api/v3/CustomValue.php index fe025cdef5..90724a6910 100644 --- a/api/v3/CustomValue.php +++ b/api/v3/CustomValue.php @@ -113,12 +113,13 @@ function civicrm_api3_custom_value_create($params) { } return civicrm_api3_create_success(TRUE, $params); } -/* + +/** * Adjust Metadata for Create action -* -* The metadata is used for setting defaults, documentation & validation -* @param array $params array or parameters determined by getfields -*/ + * + * The metadata is used for setting defaults, documentation & validation + * @param array $params array or parameters determined by getfields + */ function _civicrm_api3_custom_value_create_spec(&$params) { $params['entity_id']['api.required'] = 1; } @@ -136,8 +137,7 @@ function _civicrm_api3_custom_value_create_spec(&$params) { * @return array. * * @access public - * - **/ + */ function civicrm_api3_custom_value_get($params) { $getParams = array( @@ -225,12 +225,12 @@ function civicrm_api3_custom_value_get($params) { } } -/* +/** * Adjust Metadata for Get action -* -* The metadata is used for setting defaults, documentation & validation -* @param array $params array or parameters determined by getfields -*/ + * + * The metadata is used for setting defaults, documentation & validation + * @param array $params array or parameters determined by getfields + */ function _civicrm_api3_custom_value_get_spec(&$params) { $params['entity_id']['api.required'] = 1; } \ No newline at end of file diff --git a/api/v3/Domain.php b/api/v3/Domain.php index 0e7cd7af91..0af1ed486b 100644 --- a/api/v3/Domain.php +++ b/api/v3/Domain.php @@ -109,7 +109,8 @@ function civicrm_api3_domain_get($params) { return civicrm_api3_create_success($domains, $params, 'domain', 'get', $bao); } -/* + +/** * Adjust Metadata for Get action * * The metadata is used for setting defaults, documentation & validation @@ -132,7 +133,8 @@ function civicrm_api3_domain_create($params) { $params['version'] = $params['domain_version']; return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/Email.php b/api/v3/Email.php index ee7e61acd0..6de9a8a084 100644 --- a/api/v3/Email.php +++ b/api/v3/Email.php @@ -53,7 +53,8 @@ require_once 'CRM/Core/BAO/Email.php'; function civicrm_api3_email_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/EntityTag.php b/api/v3/EntityTag.php index b352a3293e..62409dcb47 100644 --- a/api/v3/EntityTag.php +++ b/api/v3/EntityTag.php @@ -59,7 +59,8 @@ function civicrm_api3_entity_tag_get($params) { } return civicrm_api3_create_success($result, $params); } -/* + +/** * Adjust Metadata for Get action * * The metadata is used for setting defaults, documentation & validation @@ -130,7 +131,8 @@ function civicrm_api3_entity_tag_delete($params) { return _civicrm_api3_entity_tag_common($params, 'remove'); } -/* + +/** * modify metadata */ function _civicrm_api3_entity_tag_delete_spec(&$params) { diff --git a/api/v3/Event.php b/api/v3/Event.php index d83549d0ac..d05a3f4eb6 100644 --- a/api/v3/Event.php +++ b/api/v3/Event.php @@ -70,7 +70,8 @@ function civicrm_api3_event_create($params) { _civicrm_api3_object_to_array($eventBAO, $event[$eventBAO->id]); return civicrm_api3_create_success($event, $params); } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation @@ -83,7 +84,8 @@ function _civicrm_api3_event_create_spec(&$params) { $params['is_active']['api.default'] = 1; $params['financial_type_id']['api.aliases'] = array('contribution_type_id'); } -/* + +/** * Support for schema changes made in 4.2 * The main purpose of the API is to provide integrators a level of stability not provided by * the core code or schema - this means we have to provide support for api calls (where possible) @@ -158,16 +160,18 @@ function civicrm_api3_event_get($params) { return civicrm_api3_create_success($event, $params, 'event', 'get', $eventDAO); } -/* + +/** * Adjust Metadata for Get action -* -* The metadata is used for setting defaults, documentation & validation -* @param array $params array or parameters determined by getfields -*/ + * + * The metadata is used for setting defaults, documentation & validation + * @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'); } -/* + +/** * Support for schema changes made in 4.2 * The main purpose of the API is to provide integrators a level of stability not provided by * the core code or schema - this means we have to provide support for api calls (where possible) @@ -200,7 +204,7 @@ function civicrm_api3_event_delete($params) { } /* -/* +/** * Function to 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 * diff --git a/api/v3/Generic.php b/api/v3/Generic.php index 1ff0a6cb25..c866c87a10 100644 --- a/api/v3/Generic.php +++ b/api/v3/Generic.php @@ -232,7 +232,7 @@ function civicrm_api3_generic_getoptions($apiRequest) { return civicrm_api3_constant_get($params); } -/* +/** * Function fills the 'options' array on the metadata returned by getfields if * 1) the param option 'get_options' is defined - e.g. $params['options']['get_options'] => array('custom_1) * (this is passed in as the $fieldsToResolve array) diff --git a/api/v3/Grant.php b/api/v3/Grant.php index 0d9292618e..01b252e8a8 100644 --- a/api/v3/Grant.php +++ b/api/v3/Grant.php @@ -57,7 +57,8 @@ function civicrm_api3_grant_create($params) { $params = array_merge($values, $params); return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params, 'grant'); } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/Group.php b/api/v3/Group.php index a24879a50a..817a783c00 100644 --- a/api/v3/Group.php +++ b/api/v3/Group.php @@ -71,7 +71,8 @@ function civicrm_api3_group_create($params) { return civicrm_api3_create_success($values, $params, 'group', 'create', $group); } } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/GroupContact.php b/api/v3/GroupContact.php index 050e93ce86..fa3d34c9b0 100644 --- a/api/v3/GroupContact.php +++ b/api/v3/GroupContact.php @@ -108,7 +108,8 @@ function civicrm_api3_group_contact_create($params) { $action = CRM_Utils_Array::value('status', $params, 'Added'); return _civicrm_api3_group_contact_common($params, $action); } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation @@ -130,7 +131,8 @@ function civicrm_api3_group_contact_delete($params) { $params['status'] = 'Removed'; return civicrm_api('GroupContact', 'Create', $params); } -/* + +/** * modify metadata */ function _civicrm_api3_group_contact_delete_spec(&$params) { @@ -219,7 +221,8 @@ function _civicrm_api3_group_contact_common($params, $op = 'Added') { $dao = null;// can't pass this by reference return civicrm_api3_create_success(1,$params,'group_contact','create',$dao,$extraReturnValues); } -/* + +/** * @deprecated - this should be part of create but need to know we aren't missing something */ function civicrm_api3_group_contact_update_status($params) { diff --git a/api/v3/GroupNesting.php b/api/v3/GroupNesting.php index 731cebd41a..4ec6b61b02 100644 --- a/api/v3/GroupNesting.php +++ b/api/v3/GroupNesting.php @@ -71,7 +71,8 @@ function civicrm_api3_group_nesting_create($params) { $result = array('is_error' => 0); return civicrm_api3_create_success($result, $params); } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/GroupOrganization.php b/api/v3/GroupOrganization.php index d1b411b4c3..d5795c13dd 100644 --- a/api/v3/GroupOrganization.php +++ b/api/v3/GroupOrganization.php @@ -78,7 +78,7 @@ function civicrm_api3_group_organization_create($params) { return civicrm_api3_create_success($values, $params, 'group_organization', 'get', $groupOrgBAO); } -/* +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/Im.php b/api/v3/Im.php index b14b19fce0..2e96a7d730 100644 --- a/api/v3/Im.php +++ b/api/v3/Im.php @@ -48,7 +48,8 @@ function civicrm_api3_im_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/LineItem.php b/api/v3/LineItem.php index cb09968a99..055477f95d 100644 --- a/api/v3/LineItem.php +++ b/api/v3/LineItem.php @@ -49,7 +49,8 @@ function civicrm_api3_line_item_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/LocationType.php b/api/v3/LocationType.php index 3a31c319d9..83ad6a58de 100644 --- a/api/v3/LocationType.php +++ b/api/v3/LocationType.php @@ -48,7 +48,6 @@ * {@getfields email_create} * @access public */ - function civicrm_api3_location_type_create($params) { //set display_name equal to name if it's not defined if (!array_key_exists('display_name', $params) && array_key_exists('name', $params)) { @@ -58,13 +57,12 @@ function civicrm_api3_location_type_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); } -/* +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation * @param array $params array or parameters determined by getfields */ - function _civicrm_api3_location_type_create_spec(&$params) { $params['is_active']['api.default'] = 1; $params['name']['api.required'] = 1; @@ -81,7 +79,6 @@ function _civicrm_api3_location_type_create_spec(&$params) { * {@getfields LocationType_delete} * @access public */ - function civicrm_api3_location_type_delete($params) { return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params); } @@ -100,9 +97,7 @@ function civicrm_api3_location_type_delete($params) { * {@getfields LocationType_get} * @access public */ - function civicrm_api3_location_type_get($params) { - return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params); } diff --git a/api/v3/MailSettings.php b/api/v3/MailSettings.php index c96c60f46d..0f34bf6a51 100644 --- a/api/v3/MailSettings.php +++ b/api/v3/MailSettings.php @@ -49,7 +49,8 @@ function civicrm_api3_mail_settings_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/Mailing.php b/api/v3/Mailing.php index f6f32c0eab..44a6f6a579 100644 --- a/api/v3/Mailing.php +++ b/api/v3/Mailing.php @@ -52,12 +52,12 @@ function civicrm_api3_mailing_create($params, $ids = array()) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); } -/* +/** * Adjust Metadata for Create action -* -* The metadata is used for setting defaults, documentation & validation -* @param array $params array or parameters determined by getfields -*/ + * + * The metadata is used for setting defaults, documentation & validation + * @param array $params array or parameters determined by getfields + */ function _civicrm_api3_mailing_create_spec(&$params) { $params['name']['api.required'] = 1; $params['subject']['api.required'] = 1; @@ -100,12 +100,12 @@ function civicrm_api3_mailing_event_bounce($params) { } } -/* +/** * Adjust Metadata for bounce_spec action -* -* The metadata is used for setting defaults, documentation & validation -* @param array $params array or parameters determined by getfields -*/ + * + * The metadata is used for setting defaults, documentation & validation + * @param array $params array or parameters determined by getfields + */ function _civicrm_api3_mailing_event_bounce_spec(&$params) { $params['job_id']['api.required'] = 1; $params['event_queue_id']['api.required'] = 1; @@ -152,12 +152,12 @@ function civicrm_api3_mailing_event_reply($params) { return civicrm_api3_create_success($params); } -/* +/** * Adjust Metadata for event_reply action -* -* The metadata is used for setting defaults, documentation & validation -* @param array $params array or parameters determined by getfields -*/ + * + * The metadata is used for setting defaults, documentation & validation + * @param array $params array or parameters determined by getfields + */ function _civicrm_api3_mailing_event_reply_spec(&$params) { $params['job_id']['api.required'] = 1; $params['event_queue_id']['api.required'] = 1; @@ -189,12 +189,12 @@ function civicrm_api3_mailing_event_forward($params) { return civicrm_api3_create_error('Queue event could not be found'); } -/* +/** * Adjust Metadata for event_forward action -* -* The metadata is used for setting defaults, documentation & validation -* @param array $params array or parameters determined by getfields -*/ + * + * The metadata is used for setting defaults, documentation & validation + * @param array $params array or parameters determined by getfields + */ function _civicrm_api3_mailing_event_forward_spec(&$params) { $params['job_id']['api.required'] = 1; $params['event_queue_id']['api.required'] = 1; diff --git a/api/v3/MailingEventConfirm.php b/api/v3/MailingEventConfirm.php index 95c22fa1f6..04b20b47e2 100644 --- a/api/v3/MailingEventConfirm.php +++ b/api/v3/MailingEventConfirm.php @@ -61,7 +61,8 @@ function civicrm_api3_mailing_event_confirm_create($params) { } return civicrm_api3_create_success($params); } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/MailingEventResubscribe.php b/api/v3/MailingEventResubscribe.php index 2f917fee0c..4dcac85bec 100644 --- a/api/v3/MailingEventResubscribe.php +++ b/api/v3/MailingEventResubscribe.php @@ -66,7 +66,8 @@ function civicrm_api3_mailing_event_resubscribe_create($params) { } return civicrm_api3_create_error('Queue event could not be found'); } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/MailingEventSubscribe.php b/api/v3/MailingEventSubscribe.php index 0af91a4675..3730d90bdb 100644 --- a/api/v3/MailingEventSubscribe.php +++ b/api/v3/MailingEventSubscribe.php @@ -78,7 +78,8 @@ function civicrm_api3_mailing_event_subscribe_create($params) { } return civicrm_api3_create_error('Subscription failed'); } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/MailingEventUnsubscribe.php b/api/v3/MailingEventUnsubscribe.php index b951569fd5..485651985a 100644 --- a/api/v3/MailingEventUnsubscribe.php +++ b/api/v3/MailingEventUnsubscribe.php @@ -74,7 +74,8 @@ function civicrm_api3_mailing_event_unsubscribe_create($params) { return civicrm_api3_create_error('Queue event could not be found'); } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/MailingJob.php b/api/v3/MailingJob.php index 8fd5c8e971..15b6afa5d0 100644 --- a/api/v3/MailingJob.php +++ b/api/v3/MailingJob.php @@ -51,12 +51,12 @@ function civicrm_api3_mailing_job_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); } -/* +/** * Adjust Metadata for Create action -* -* The metadata is used for setting defaults, documentation & validation -* @param array $params array or parameters determined by getfields -*/ + * + * The metadata is used for setting defaults, documentation & validation + * @param array $params array or parameters determined by getfields + */ function _civicrm_api3_mailing_job_create_spec(&$params) { $params['status']['api.default'] = 'Scheduled'; $params['scheduled_date']['api.default'] = 'now'; diff --git a/api/v3/Membership.php b/api/v3/Membership.php index 44dafb1998..80414a4bcb 100644 --- a/api/v3/Membership.php +++ b/api/v3/Membership.php @@ -73,7 +73,7 @@ function civicrm_api3_membership_delete($params) { } -/* +/** * modify metadata */ function _civicrm_api3_membership_delete_spec(&$params) { @@ -153,7 +153,8 @@ function civicrm_api3_membership_create($params) { return civicrm_api3_create_success($membership, $params, 'membership', 'create', $membershipBAO); } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation @@ -317,7 +318,8 @@ function _civicrm_api3_membership_format_params($params, &$values, $create = FAL return NULL; } -/* + +/** * When we copied apiv3 from api v2 we brought across some custom behaviours - in the case of * membership a complicated return array is constructed. The original * behaviour made contact_id a required field. We still need to keep this for v3 when contact_id diff --git a/api/v3/MembershipPayment.php b/api/v3/MembershipPayment.php index f960da117a..147bb4dc72 100644 --- a/api/v3/MembershipPayment.php +++ b/api/v3/MembershipPayment.php @@ -74,7 +74,8 @@ function civicrm_api3_membership_payment_create($params) { return civicrm_api3_create_success($mpArray, $params); } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/MembershipStatus.php b/api/v3/MembershipStatus.php index 082e45748e..979fe70e08 100644 --- a/api/v3/MembershipStatus.php +++ b/api/v3/MembershipStatus.php @@ -59,12 +59,12 @@ function civicrm_api3_membership_status_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); } -/* +/** * Adjust Metadata for Create action -* -* The metadata is used for setting defaults, documentation & validation -* @param array $params array or parameters determined by getfields -*/ + * + * The metadata is used for setting defaults, documentation & validation + * @param array $params array or parameters determined by getfields + */ function _civicrm_api3_membership_status_create_spec(&$params) { $params['name']['api.aliases'] = array('label'); } diff --git a/api/v3/MembershipType.php b/api/v3/MembershipType.php index 006ba3ad09..91ea2cc29c 100644 --- a/api/v3/MembershipType.php +++ b/api/v3/MembershipType.php @@ -68,7 +68,8 @@ function civicrm_api3_membership_type_create($params) { CRM_Member_PseudoConstant::membershipType(NULL, TRUE); return civicrm_api3_create_success($membershipType, $params, 'membership_type', 'create', $membershipTypeBAO); } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/Note.php b/api/v3/Note.php index 2f8a4eca94..598d991d6a 100644 --- a/api/v3/Note.php +++ b/api/v3/Note.php @@ -76,7 +76,8 @@ function civicrm_api3_note_create($params) { $result = civicrm_api3_create_success($note, $params); return civicrm_api3_create_success($note, $params); } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation @@ -121,7 +122,8 @@ function civicrm_api3_note_get($params) { return _civicrm_api3_basic_get('CRM_Core_BAO_Note', $params); } -/* + +/** * Adjust Metadata for Get action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/OptionGroup.php b/api/v3/OptionGroup.php index b39dcc1832..d6b12e3667 100644 --- a/api/v3/OptionGroup.php +++ b/api/v3/OptionGroup.php @@ -36,7 +36,7 @@ function civicrm_api3_option_group_create($params) { } } -/* +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/OptionValue.php b/api/v3/OptionValue.php index 51cf6f8762..30b7e26be1 100644 --- a/api/v3/OptionValue.php +++ b/api/v3/OptionValue.php @@ -83,7 +83,7 @@ function civicrm_api3_option_value_create($params) { return civicrm_api3_create_success($values, $params); } -/* +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/Participant.php b/api/v3/Participant.php index 6a18be78b0..e3d1c74123 100644 --- a/api/v3/Participant.php +++ b/api/v3/Participant.php @@ -78,7 +78,7 @@ function civicrm_api3_participant_create($params) { return civicrm_api3_create_success($participant, $params, 'participant', 'create', $participantBAO); } -/* +/** * Create a default participant line item */ function _civicrm_api3_participant_createlineitem(&$params, $participant){ @@ -111,7 +111,7 @@ where ps.id is not null } -/* +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation @@ -171,7 +171,7 @@ function civicrm_api3_participant_get($params) { return civicrm_api3_create_success($participant, $params, 'participant', 'get', $dao); } -/* +/** * Adjust Metadata for Get action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/ParticipantPayment.php b/api/v3/ParticipantPayment.php index d195bb0eea..f23f627eea 100644 --- a/api/v3/ParticipantPayment.php +++ b/api/v3/ParticipantPayment.php @@ -70,7 +70,8 @@ function civicrm_api3_participant_payment_create($params) { return civicrm_api3_create_success($payment, $params); } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/Phone.php b/api/v3/Phone.php index 320951eaf1..d32561080a 100644 --- a/api/v3/Phone.php +++ b/api/v3/Phone.php @@ -56,7 +56,7 @@ function civicrm_api3_phone_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); } -/* +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/Pledge.php b/api/v3/Pledge.php index 4ee537eece..e77858a3f5 100644 --- a/api/v3/Pledge.php +++ b/api/v3/Pledge.php @@ -88,7 +88,8 @@ function _civicrm_api3_pledge_delete_spec(&$params) { // set as not required as pledge_id also acceptable & no either/or std yet $params['id']['api.aliases'] = array('pledge_id'); } -/* + +/** * return field specification specific to get requests */ function _civicrm_api3_pledge_get_spec(&$params) { @@ -104,7 +105,7 @@ function _civicrm_api3_pledge_get_spec(&$params) { } -/* +/** * return field specification specific to get requests */ function _civicrm_api3_pledge_create_spec(&$params) { @@ -156,7 +157,7 @@ function civicrm_api3_pledge_get($params) { return civicrm_api3_create_success($pledge, $params, 'pledge', 'get', $dao); } -/* +/** * Set default to not return test params */ function _civicrm_api3_pledge_get_defaults() { diff --git a/api/v3/PledgePayment.php b/api/v3/PledgePayment.php index e95516eb7d..4688fb11e5 100644 --- a/api/v3/PledgePayment.php +++ b/api/v3/PledgePayment.php @@ -84,7 +84,8 @@ function civicrm_api3_pledge_payment_create($params) { return civicrm_api3_create_success($result, $params, 'pledge_payment', 'create', $dao); } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation @@ -139,7 +140,7 @@ function updatePledgePayments($pledgeId, $paymentStatusId, $paymentIds) { return $result; } -/* +/** * Gets field for civicrm_pledge_payment functions * * @return array fields valid for other functions diff --git a/api/v3/PriceField.php b/api/v3/PriceField.php index aed5e286cd..54867dc6e3 100644 --- a/api/v3/PriceField.php +++ b/api/v3/PriceField.php @@ -49,7 +49,8 @@ function civicrm_api3_price_field_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/PriceFieldValue.php b/api/v3/PriceFieldValue.php index f64e6e572e..8aae82c36d 100644 --- a/api/v3/PriceFieldValue.php +++ b/api/v3/PriceFieldValue.php @@ -58,8 +58,9 @@ function civicrm_api3_price_field_value_create($params) { _civicrm_api3_object_to_array($bao, $values[$bao->id]); return civicrm_api3_create_success($values, $params, 'price_field_value', 'create', $bao); - } -/* +} + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/PriceSet.php b/api/v3/PriceSet.php index f0d999d2fd..6916b13e5c 100644 --- a/api/v3/PriceSet.php +++ b/api/v3/PriceSet.php @@ -64,7 +64,7 @@ function civicrm_api3_price_set_create($params) { return $result; } -/* +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/Profile.php b/api/v3/Profile.php index 2cb44ab969..0ed649cf2a 100644 --- a/api/v3/Profile.php +++ b/api/v3/Profile.php @@ -317,7 +317,7 @@ function civicrm_api3_profile_apply($params) { return civicrm_api3_create_success($data); } -/* +/** * Return UFGroup fields */ function civicrm_api3_profile_getfields($params) { diff --git a/api/v3/Relationship.php b/api/v3/Relationship.php index 033e4724b7..1b6c3cb94a 100644 --- a/api/v3/Relationship.php +++ b/api/v3/Relationship.php @@ -82,7 +82,8 @@ function civicrm_api3_relationship_create($params) { 'moreIDs' => implode(',', $relationshipBAO[4]), ))); } -/* + +/** * Adjust Metadata for Create action * * @param array $params array or parameters determined by getfields diff --git a/api/v3/RelationshipType.php b/api/v3/RelationshipType.php index 95d88ef476..291415b89f 100644 --- a/api/v3/RelationshipType.php +++ b/api/v3/RelationshipType.php @@ -84,7 +84,8 @@ function civicrm_api3_relationship_type_create($params) { return civicrm_api3_create_success($relType, $params, 'relationship_type', 'create', $relationType); } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/ReportTemplate.php b/api/v3/ReportTemplate.php index a5331b6526..86d748ccb3 100644 --- a/api/v3/ReportTemplate.php +++ b/api/v3/ReportTemplate.php @@ -41,7 +41,7 @@ function civicrm_api3_report_template_create($params) { return civicrm_api3_option_value_create($params); } -/* +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/Setting.php b/api/v3/Setting.php index f23c70280d..2b5ccbabd9 100644 --- a/api/v3/Setting.php +++ b/api/v3/Setting.php @@ -69,7 +69,8 @@ function civicrm_api3_setting_getfields($params) { } return civicrm_api3_create_success($result, $params, 'setting', 'getfields'); } -/* + +/** * Alter metadata for getfields functions */ function _civicrm_api3_setting_getfields_spec(&$params) { @@ -77,7 +78,8 @@ function _civicrm_api3_setting_getfields_spec(&$params) { $params['component_id'] = array('title' => 'id of relevant component'); $params['profile'] = array('title' => 'profile is passed through to hooks & added to cachestring'); } -/* + +/** * Return default values for settings. We will domain key this as it could vary by domain (ie. urls) * as we will be creating the option for a function rather than an value to be in the defaults * Note that is not in place as yet @@ -104,11 +106,11 @@ function civicrm_api3_setting_getdefaults(&$params){ } return civicrm_api3_create_success($defaults,$params,'setting','getfields'); } -/* -* Metadata for setting create function -* -* @param array $params parameters as passed to the API -*/ +/** + * Metadata for setting create function + * + * @param array $params parameters as passed to the API + */ function _civicrm_api3_setting_getdefaults_spec(&$params) { $params['domain_id'] = array( 'api.default' => 'current_domain', @@ -116,7 +118,8 @@ function _civicrm_api3_setting_getdefaults_spec(&$params) { an array or "all" are acceptable values for multiple domains' ); } -/* + +/** * Revert settings to defaults */ function civicrm_api3_setting_revert(&$params){ @@ -137,9 +140,10 @@ function civicrm_api3_setting_revert(&$params){ return civicrm_api3_create_success($result, $params, 'setting', 'revert'); } -/* + +/** * Alter metadata for getfields functions -*/ + */ function _civicrm_api3_setting_revert_spec(&$params) { $params['name'] = array('title' => 'Setting Name belongs to'); $params['component_id'] = array('title' => 'id of relevant component'); @@ -150,9 +154,9 @@ function _civicrm_api3_setting_revert_spec(&$params) { ); } -/* +/** * Revert settings to defaults -*/ + */ function civicrm_api3_setting_fill(&$params){ $defaults = civicrm_api('setting','getdefaults', $params); $domains = _civicrm_api3_setting_getDomainArray($params); @@ -170,9 +174,10 @@ function civicrm_api3_setting_fill(&$params){ } return civicrm_api3_create_success($result, $params, 'setting', 'fill'); } -/* + +/** * Alter metadata for getfields functions -*/ + */ function _civicrm_api3_setting_fill_spec(&$params) { $params['name'] = array('title' => 'Setting Name belongs to'); $params['component_id'] = array('title' => 'id of relevant component'); @@ -199,7 +204,8 @@ function civicrm_api3_setting_create($params) { $result = CRM_Core_BAO_Setting::setItems($params, $domains); return civicrm_api3_create_success($result,$params,'setting','create'); } -/* + +/** * Metadata for setting create function * * @param array $params parameters as passed to the API @@ -231,11 +237,11 @@ function civicrm_api3_setting_get($params) { $result = $result = CRM_Core_BAO_Setting::getItems($params, $domains, CRM_Utils_Array::value('return', $params, array())); return civicrm_api3_create_success($result,$params,'setting','get'); } -/* +/** * 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( 'api.default' => 'current_domain', @@ -272,11 +278,11 @@ function civicrm_api3_setting_getvalue($params) { ); } -/* +/** * 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) { $params['group'] = array( @@ -300,7 +306,8 @@ function _civicrm_api3_setting_getvalue_spec(&$params) { 'description' => 'if you do not pass in a domain id this will default to the current domain' ); } -/* + +/** * Converts domain input into an array. If an array is passed in this is used, if 'all' is passed * in this is converted to 'all arrays' * diff --git a/api/v3/Survey.php b/api/v3/Survey.php index 326cdcadc3..684359d69b 100644 --- a/api/v3/Survey.php +++ b/api/v3/Survey.php @@ -50,7 +50,8 @@ function civicrm_api3_survey_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); } -/* + +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/SurveyRespondant.php b/api/v3/SurveyRespondant.php index dc30a03136..e56d8eae09 100644 --- a/api/v3/SurveyRespondant.php +++ b/api/v3/SurveyRespondant.php @@ -77,7 +77,7 @@ function civicrm_api3_survey_respondant_get(&$params) { return (civicrm_api3_create_success($respondants, $params)); } -/* +/** * @deprecated - api currently not supported */ function &civicrm_api3_survey_respondant_count($params) { diff --git a/api/v3/System.php b/api/v3/System.php index ed44281649..80231f8219 100644 --- a/api/v3/System.php +++ b/api/v3/System.php @@ -59,7 +59,7 @@ function civicrm_api3_system_flush($params) { return civicrm_api3_create_success(); } -/* +/** * Adjust Metadata for Flush action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/Tag.php b/api/v3/Tag.php index 4bdd845b6e..490862866b 100644 --- a/api/v3/Tag.php +++ b/api/v3/Tag.php @@ -68,7 +68,8 @@ function civicrm_api3_tag_create($params) { _civicrm_api3_object_to_array($tagBAO, $values[$tagBAO->id]); return civicrm_api3_create_success($values, $params, 'tag', 'create', $tagBAO); } -/* + +/** * 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. */ diff --git a/api/v3/UFJoin.php b/api/v3/UFJoin.php index e76ed4c1d7..75fcf4085b 100644 --- a/api/v3/UFJoin.php +++ b/api/v3/UFJoin.php @@ -60,7 +60,8 @@ function civicrm_api3_uf_join_create($params) { _civicrm_api3_object_to_array($ufJoin, $ufJoinArray[]); return civicrm_api3_create_success($ufJoinArray, $params, 'uf_join', 'create'); } -/* + +/** * Adjust Metadata for Create action * * @param array $params array or parameters determined by getfields diff --git a/api/v3/UFMatch.php b/api/v3/UFMatch.php index fd84b25552..388a562a4f 100644 --- a/api/v3/UFMatch.php +++ b/api/v3/UFMatch.php @@ -67,12 +67,13 @@ function civicrm_api3_uf_match_get($params) { function civicrm_api3_uf_match_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); } -/* + +/** * Adjust Metadata for Create action -* -* The metadata is used for setting defaults, documentation & validation -* @param array $params array or parameters determined by getfields -*/ + * + * The metadata is used for setting defaults, documentation & validation + * @param array $params array or parameters determined by getfields + */ function _civicrm_api3_uf_match_create_spec(&$params) { $params['contact_id']['api.required'] = 1; $params['uf_id']['api.required'] = 1; diff --git a/api/v3/Website.php b/api/v3/Website.php index ed7f52dbe5..36d5ebc422 100644 --- a/api/v3/Website.php +++ b/api/v3/Website.php @@ -58,9 +58,9 @@ function civicrm_api3_website_create($params) { $values = array(); _civicrm_api3_object_to_array($websiteBAO, $values[$websiteBAO->id]); return civicrm_api3_create_success($values, $params, 'website', 'get'); +} - } -/* +/** * Adjust Metadata for Create action * * The metadata is used for setting defaults, documentation & validation diff --git a/api/v3/utils.php b/api/v3/utils.php index 8181f4248a..b05a438af0 100644 --- a/api/v3/utils.php +++ b/api/v3/utils.php @@ -46,7 +46,7 @@ function _civicrm_api3_initialize() { $config = CRM_Core_Config::singleton(); } -/* +/** * 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 @@ -66,7 +66,7 @@ function civicrm_api3_verify_one_mandatory($params, $daoName = NULL, $keyoptions civicrm_api3_verify_mandatory($params, $daoName, $keys); } -/* +/** * Function to check mandatory fields are included * * @param array $params array of fields to check @@ -248,7 +248,8 @@ function civicrm_api3_create_success($values = 1, $params = array( return array_merge($result, $extraReturnValues); } -/* + +/** * Load the DAO of the entity */ function _civicrm_api3_load_DAO($entity) { @@ -261,7 +262,8 @@ function _civicrm_api3_load_DAO($entity) { $d = new $dao(); return $d; } -/* + +/** * Function to return the DAO of the function or Entity * @param $name is either a function of the api (civicrm_{entity}_create or the entity name * return the DAO name to manipulate this function @@ -308,7 +310,7 @@ function _civicrm_api3_get_DAO($name) { return CRM_Utils_Array::value(_civicrm_api_get_camel_name($name, 3), $dao); } -/* +/** * Function to return the DAO of the function or Entity * @param $name is either a function of the api (civicrm_{entity}_create or the entity name * return the DAO name to manipulate this function @@ -340,7 +342,8 @@ function _civicrm_api3_separate_values(&$values) { } } } -/* + +/** * This is a wrapper for api_store_values which will check the suitable fields using getfields * rather than DAO->fields * @@ -456,7 +459,8 @@ function _civicrm_api3_get_using_query_object($entity, $params, $additional_opti return $entities; } -/* + +/** * Function transfers the filters being passed into the DAO onto the params object */ function _civicrm_api3_dao_set_filter(&$dao, $params, $unique = TRUE, $entity) { @@ -571,7 +575,7 @@ function _civicrm_api3_dao_set_filter(&$dao, $params, $unique = TRUE, $entity) { } } -/* +/** * 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 @@ -595,8 +599,8 @@ function _civicrm_api3_apply_filters_to_dao($filterField, $filterValue, &$dao) { } } } -/* - * + +/** * 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 @@ -681,7 +685,8 @@ function _civicrm_api3_get_options_from_params(&$params, $queryObject = false, $ $options['input_params'] = $inputParams; return $options; } -/* + +/** * 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 @@ -695,8 +700,7 @@ function _civicrm_api3_apply_options_to_dao(&$params, &$dao, $entity) { } } - -/* +/** * build fields array. This is the array of fields as it relates to the given DAO * returns unique fields as keys by default but if set but can return by DB fields */ @@ -717,7 +721,7 @@ function _civicrm_api3_build_fields_array(&$bao, $unique = TRUE) { return $dbFields; } -/* +/** * build fields array. This is the array of fields as it relates to the given DAO * returns unique fields as keys by default but if set but can return by DB fields */ @@ -729,7 +733,6 @@ function _civicrm_api3_get_unique_name_array(&$bao) { return $uniqueFields; } - /** * Converts an DAO object to an array * @@ -797,7 +800,7 @@ function _civicrm_api3_object_to_array(&$dao, &$values, $uniqueFields = FALSE) { } } -/* +/** * Wrapper for _civicrm_object_to_array when api supports unique fields */ function _civicrm_api3_object_to_array_unique_fields(&$dao, &$values) { @@ -925,7 +928,7 @@ function _civicrm_api3_api_check_permission($entity, $action, &$params, $throw = return TRUE; } -/* +/** * 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 @@ -943,7 +946,7 @@ function _civicrm_api3_basic_get($bao_name, &$params, $returnAsSuccess = TRUE, $ } } -/* +/** * 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 @@ -976,7 +979,7 @@ function _civicrm_api3_basic_create($bao_name, &$params, $entity = null) { } } -/* +/** * Function to do a 'standard' api del - when the api is only doing a $bao::del then use this * if api::del doesn't exist it will try DAO delete method */ @@ -1005,7 +1008,7 @@ function _civicrm_api3_basic_delete($bao_name, &$params) { return civicrm_api3_create_error('no delete method found'); } -/* +/** * 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) * @@ -1047,7 +1050,7 @@ function _civicrm_api3_custom_data_get(&$returnArray, $entity, $entity_id, $grou } } -/* +/** * Validate fields being passed into API. This function relies on the getFields function working accurately * for the given API. If error mode is set to TRUE then it will also check * foreign keys @@ -1110,7 +1113,7 @@ function _civicrm_api3_validate_fields($entity, $action, &$params, $errorMode = } } -/* +/** * Validate date fields being passed into API. * It currently converts both unique fields and DB field names to a mysql date. * @todo - probably the unique field handling & the if exists handling is now done before this @@ -1141,7 +1144,8 @@ function _civicrm_api3_validate_date(&$params, &$fieldname, &$fieldInfo) { $params[$fieldname] = CRM_Utils_Date::processDate($params[$fieldname]); } } -/* + +/** * Validate foreign constraint fields being passed into API. * * @param array $params params from civicrm_api @@ -1160,7 +1164,7 @@ function _civicrm_api3_validate_constraint(&$params, &$fieldname, &$fieldInfo) { } } -/* +/** * Validate foreign constraint fields being passed into API. * * @param array $params params from civicrm_api @@ -1258,7 +1262,7 @@ function _civicrm_api3_generic_replace($entity, $params) { } } -/* +/** * returns fields allowable by api * @param $entity string Entity to query * @param bool $unique index by unique fields? @@ -1300,7 +1304,7 @@ function _civicrm_api_get_fields($entity, $unique = FALSE, &$params = array( return $fields; } -/* +/** * Return an array of fields for a given entity - this is the same as the BAO function but * fields are prefixed with 'custom_' to represent api params */ @@ -1340,7 +1344,8 @@ function _civicrm_api_get_custom_fields($entity, &$params) { } return $customfields; } -/* + +/** * Return array of defaults for the given API (function is a wrapper on getfields) */ function _civicrm_api3_getdefaults($apiRequest) { @@ -1362,7 +1367,7 @@ function _civicrm_api3_getdefaults($apiRequest) { return $defaults; } -/* +/** * Return array of defaults for the given API (function is a wrapper on getfields) */ function _civicrm_api3_getrequired($apiRequest) { @@ -1383,7 +1388,7 @@ function _civicrm_api3_getrequired($apiRequest) { return $required; } -/* +/** * Fill params array with alternate (alias) values where a field has an alias and that is filled & the main field isn't * If multiple aliases the last takes precedence * @@ -1440,7 +1445,8 @@ function _civicrm_api3_swap_out_aliases(&$apiRequest) { } } -/* + +/** * Validate integer fields being passed into API. * It currently converts the incoming value 'user_contact_id' into the id of the currenty logged in user * @@ -1502,7 +1508,7 @@ function _civicrm_api3_validate_html(&$params, &$fieldname, &$fieldInfo) { } } -/* +/** * Validate string fields being passed into API. * @param array $params params from civicrm_api * @param string $fieldname uniquename of field being checked -- 2.25.1