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