X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FSurvey.php;h=9bd314aed34fef833303ae4a809460743cb3528b;hb=4846df9154866b0a33ee8ec7a1f48c65c77b670b;hp=1f088337cb032a1f2b0436c07aa93283b7d2fc70;hpb=3b14bfec8a2c2f2a5b293be6b981bf58da73b832;p=civicrm-core.git diff --git a/api/v3/Survey.php b/api/v3/Survey.php index 1f088337cb..9bd314aed3 100644 --- a/api/v3/Survey.php +++ b/api/v3/Survey.php @@ -26,25 +26,24 @@ */ /** - * File for the CiviCRM APIv3 group functions + * This api exposes CiviCRM survey/petition records. + * + * @note Campaign component must be enabled. + * @note There is no "petition" api. + * Surveys and petitions are the same basic object and this api is used for both. * * @package CiviCRM_APIv3 - * @subpackage API_Survey - * @copyright CiviCRM LLC (c) 2004-2014 */ /** - * Create or update a survey + * Create or update a survey. * * @param array $params - * Associative array of property. - * name/value pairs to insert in new 'survey' - * @example SurveyCreate.php Std Create example + * Array per getfields metadata. * * @return array * api result array - * {@getfields survey_create} */ function civicrm_api3_survey_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params, 'Survey'); @@ -56,41 +55,36 @@ function civicrm_api3_survey_create($params) { * The metadata is used for setting defaults, documentation & validation. * * @param array $params - * Array or parameters determined by getfields. + * Array of parameters determined by getfields. */ function _civicrm_api3_survey_create_spec(&$params) { $params['title']['api.required'] = 1; } /** - * Returns array of surveys matching a set of one or more group properties + * Returns array of surveys matching a set of one or more group properties. * * @param array $params - * Array of one or more valid. - * property_name=>value pairs. If $params is set - * as null, all surveys will be returned + * Array of properties. If empty, all records will be returned. * * @return array * API result Array of matching surveys - * {@getfields survey_get} */ function civicrm_api3_survey_get($params) { return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params, TRUE, 'Survey'); } /** - * delete an existing survey + * Delete an existing survey. * * This method is used to delete any existing survey. id of the group * to be deleted is required field in $params array * * @param array $params - * Array containing id of the group. - * to be deleted + * [id] * * @return array * api result array - * {@getfields survey_delete} */ function civicrm_api3_survey_delete($params) { return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);