Merge pull request #5058 from eileenmcnaughton/test-examples
[civicrm-core.git] / api / v3 / ReportInstance.php
1 <?php
2
3 /**
4 * Retrieve a report instance
5 *
6 * @param array $params
7 * Input parameters.
8 *
9 * @return array
10 * details of found instances
11 */
12 function civicrm_api3_report_instance_get($params) {
13 return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
14 }
15
16 /**
17 * Add or update a report instance.
18 *
19 * @param array $params
20 *
21 * @return array
22 * Array of newly created report instance property values.
23 */
24 function civicrm_api3_report_instance_create($params) {
25 return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params);
26 }
27
28 /**
29 * Adjust Metadata for Create action.
30 *
31 * The metadata is used for setting defaults, documentation & validation.
32 *
33 * @param array $params
34 * Array or parameters determined by getfields.
35 */
36 function _civicrm_api3_report_instance_create_spec(&$params) {
37 $params['report_id']['api.required'] = 1;
38 $params['title']['api.required'] = 1;
39 }
40
41 /**
42 * Deletes an existing ReportInstance
43 *
44 * @param array $params
45 *
46 * @return array
47 * Api result
48 */
49 function civicrm_api3_report_instance_delete($params) {
50 return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
51 }