Commit | Line | Data |
---|---|---|
e2bef985 | 1 | <?php |
e2bef985 | 2 | /* |
3 | +--------------------------------------------------------------------+ | |
a30c801b | 4 | | Copyright CiviCRM LLC. All rights reserved. | |
e2bef985 | 5 | | | |
a30c801b TO |
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 | | |
e2bef985 | 9 | +--------------------------------------------------------------------+ |
10 | */ | |
11 | ||
12 | /** | |
c28e1768 | 13 | * This api exposes CiviCRM SystemLog. |
e2bef985 | 14 | * |
15 | * @package CiviCRM_APIv3 | |
e2bef985 | 16 | */ |
17 | ||
b13d4a69 | 18 | /** |
9d32e6f7 EM |
19 | * Delete system log record. |
20 | * | |
c490a46a | 21 | * @param array $params |
b13d4a69 EM |
22 | * |
23 | * @return array | |
24 | */ | |
25 | function civicrm_api3_system_log_delete($params) { | |
a60c0bc8 | 26 | return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params); |
b13d4a69 EM |
27 | } |
28 | ||
29 | /** | |
9d32e6f7 EM |
30 | * Create system log record. |
31 | * | |
4f8ccea0 EM |
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. | |
9d32e6f7 | 34 | * |
c490a46a | 35 | * @param array $params |
b13d4a69 EM |
36 | * |
37 | * @return array | |
38 | */ | |
39 | function civicrm_api3_system_log_create($params) { | |
40 | return civicrm_api3('system', 'log', $params); | |
41 | } | |
42 | ||
4f8ccea0 | 43 | /** |
9d32e6f7 | 44 | * Adjust system log create metadata. |
4f8ccea0 | 45 | * |
9d32e6f7 | 46 | * @param array $params |
4f8ccea0 EM |
47 | */ |
48 | function _civicrm_api3_system_log_create_spec(&$params) { | |
35671d00 TO |
49 | require_once 'api/v3/System.php'; |
50 | _civicrm_api3_system_log_spec($params); | |
4f8ccea0 EM |
51 | } |
52 | ||
b13d4a69 | 53 | /** |
9d32e6f7 EM |
54 | * Get system log record. |
55 | * | |
c490a46a | 56 | * @param array $params |
b13d4a69 EM |
57 | * |
58 | * @return array | |
59 | */ | |
e2bef985 | 60 | function civicrm_api3_system_log_get($params) { |
35671d00 | 61 | return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params, TRUE, 'SystemLog'); |
e2bef985 | 62 | } |