Merge pull request #19287 from eileenmcnaughton/group2
[civicrm-core.git] / api / v3 / MailSettings.php
CommitLineData
6a488035 1<?php
6a488035
TO
2/*
3 +--------------------------------------------------------------------+
a30c801b 4 | Copyright CiviCRM LLC. All rights reserved. |
6a488035 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 |
6a488035
TO
9 +--------------------------------------------------------------------+
10 */
11
12/**
c28e1768 13 * This api exposes CiviCRM mail settings.
6a488035
TO
14 *
15 * @package CiviCRM_APIv3
6a488035
TO
16 */
17
18/**
244bbdd8 19 * Create or update a MailSettings.
6a488035 20 *
cf470720 21 * @param array $params
244bbdd8 22 * name/value pairs to insert in new 'MailSettings'
6a488035 23 *
a6c01b45 24 * @return array
1747ab99 25 * API result array.
6a488035
TO
26 */
27function civicrm_api3_mail_settings_create($params) {
a25b46e9 28 return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params, 'MailSettings');
6a488035 29}
11e09c59
TO
30
31/**
0aa0303c
EM
32 * Adjust Metadata for Create action.
33 *
34 * The metadata is used for setting defaults, documentation & validation.
6a488035 35 *
cf470720 36 * @param array $params
b081365f 37 * Array of parameters determined by getfields.
6a488035
TO
38 */
39function _civicrm_api3_mail_settings_create_spec(&$params) {
6a488035
TO
40}
41
42/**
244bbdd8 43 * Returns array of MailSettings matching a set of one or more properties.
6a488035 44 *
cf470720 45 * @param array $params
c28e1768 46 * Array of one or more property_name=>value pairs.
244bbdd8 47 * If $params is set as null, all MailSettings will be returned.
6a488035 48 *
a6c01b45 49 * @return array
1747ab99 50 * API result array.
6a488035
TO
51 */
52function civicrm_api3_mail_settings_get($params) {
53 return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
54}
55
56/**
244bbdd8 57 * Delete an existing MailSettings.
6a488035 58 *
cf470720 59 * @param array $params
c28e1768 60 * [id]
6a488035 61 *
a6c01b45 62 * @return array
1747ab99 63 * API result array.
6a488035
TO
64 */
65function civicrm_api3_mail_settings_delete($params) {
66 return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
67}