Commit | Line | Data |
---|---|---|
4ff927bc | 1 | <?php |
2 | /* | |
3 | +--------------------------------------------------------------------+ | |
a30c801b | 4 | | Copyright CiviCRM LLC. All rights reserved. | |
4ff927bc | 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 | | |
4ff927bc | 9 | +--------------------------------------------------------------------+ |
10 | */ | |
11 | ||
12 | /** | |
13 | * This api exposes CiviCRM MembershipLog records. | |
14 | * | |
15 | * @package CiviCRM_APIv3 | |
16 | */ | |
17 | ||
18 | /** | |
19 | * API to Create or update a MembershipLog. | |
20 | * | |
21 | * @param array $params | |
22 | * Values of MembershipLog. | |
23 | * | |
24 | * @return array | |
25 | * API result array. | |
26 | */ | |
27 | function civicrm_api3_membership_log_create($params) { | |
a25b46e9 | 28 | return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params, 'MembershipLog'); |
4ff927bc | 29 | } |
30 | ||
31 | /** | |
32 | * Adjust Metadata for Create action. | |
33 | * | |
34 | * The metadata is used for setting defaults, documentation & validation. | |
35 | * | |
36 | * @param array $params | |
37 | * Array of parameters determined by getfields. | |
38 | */ | |
39 | function _civicrm_api3_membership_log_create_spec(&$params) { | |
40 | $params['membership_id']['api.required'] = TRUE; | |
41 | } | |
42 | ||
43 | /** | |
44 | * Get a Membership Log. | |
45 | * | |
46 | * This api is used for finding an existing membership log. | |
47 | * | |
48 | * @param array $params | |
49 | * An associative array of name/value property values of civicrm_membership_log. | |
50 | * {getfields MembershipLog_get} | |
51 | * | |
52 | * @return array | |
53 | * API result array | |
54 | */ | |
55 | function civicrm_api3_membership_log_get($params) { | |
56 | return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params); | |
57 | } | |
58 | ||
59 | /** | |
60 | * Deletes an existing membership log. | |
61 | * | |
62 | * This API is used for deleting a membership log | |
63 | * Required parameters : id of a membership log | |
64 | * | |
65 | * @param array $params | |
66 | * | |
67 | * @return array | |
68 | * API result array | |
69 | */ | |
70 | function civicrm_api3_membership_log_delete($params) { | |
71 | return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params); | |
72 | } |