INFRA-132 - Misc
[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 * @param array $params
33 * Array or parameters determined by getfields.
34 */
35 function _civicrm_api3_report_instance_create_spec(&$params) {
36 $params['report_id']['api.required'] = 1;
37 $params['title']['api.required'] = 1;
38 }
39
40 /**
41 * Deletes an existing ReportInstance
42 *
43 * @param array $params
44 *
45 * @return array
46 * Api result
47 */
48 function civicrm_api3_report_instance_delete($params) {
49 return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
50 }