+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
* 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
+ * This method is used to delete any existing survey given its id.
*
* @param array $params
* [id]
function civicrm_api3_survey_delete($params) {
return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
+
+/**
+ * Set default getlist parameters.
+ *
+ * @see _civicrm_api3_generic_getlist_defaults
+ *
+ * @param array $request
+ *
+ * @return array
+ */
+function _civicrm_api3_survey_getlist_defaults(&$request) {
+ return array(
+ 'description_field' => array(
+ 'campaign_id',
+ ),
+ 'params' => array(
+ 'is_active' => 1,
+ ),
+ );
+}