Merge pull request #17656 from civicrm/5.27
[civicrm-core.git] / api / v3 / MailSettings.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 mail settings.
14 *
15 * @package CiviCRM_APIv3
16 */
17
18 /**
19 * Create or update a MailSettings.
20 *
21 * @param array $params
22 * name/value pairs to insert in new 'MailSettings'
23 *
24 * @return array
25 * API result array.
26 */
27 function civicrm_api3_mail_settings_create($params) {
28 return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params, 'MailSettings');
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_mail_settings_create_spec(&$params) {
40 }
41
42 /**
43 * Returns array of MailSettings matching a set of one or more properties.
44 *
45 * @param array $params
46 * Array of one or more property_name=>value pairs.
47 * If $params is set as null, all MailSettings will be returned.
48 *
49 * @return array
50 * API result array.
51 */
52 function civicrm_api3_mail_settings_get($params) {
53 return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
54 }
55
56 /**
57 * Delete an existing MailSettings.
58 *
59 * @param array $params
60 * [id]
61 *
62 * @return array
63 * API result array.
64 */
65 function civicrm_api3_mail_settings_delete($params) {
66 return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
67 }