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