Merge pull request #19120 from eileenmcnaughton/fee
[civicrm-core.git] / api / v3 / SystemLog.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
10 */
11
12 /**
13 * This api exposes CiviCRM SystemLog.
14 *
15 * @package CiviCRM_APIv3
16 */
17
18 /**
19 * Delete system log record.
20 *
21 * @param array $params
22 *
23 * @return array
24 */
25 function civicrm_api3_system_log_delete($params) {
26 return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
27 }
28
29 /**
30 * Create system log record.
31 *
32 * It's arguable whether this function should exist as it fits our crud pattern and adding it meets our SyntaxConformance test requirements
33 * but it just wraps system.log which is more consistent with the PSR3 implemented.
34 *
35 * @param array $params
36 *
37 * @return array
38 */
39 function civicrm_api3_system_log_create($params) {
40 return civicrm_api3('system', 'log', $params);
41 }
42
43 /**
44 * Adjust system log create metadata.
45 *
46 * @param array $params
47 */
48 function _civicrm_api3_system_log_create_spec(&$params) {
49 require_once 'api/v3/System.php';
50 _civicrm_api3_system_log_spec($params);
51 }
52
53 /**
54 * Get system log record.
55 *
56 * @param array $params
57 *
58 * @return array
59 */
60 function civicrm_api3_system_log_get($params) {
61 return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params, TRUE, 'SystemLog');
62 }