APIv4 - Add MailingGroup API
[civicrm-core.git] / Civi / Api4 / Setting.php
CommitLineData
19b53e5b 1<?php
380f3545
TO
2/*
3 +--------------------------------------------------------------------+
41498ac5 4 | Copyright CiviCRM LLC. All rights reserved. |
380f3545 5 | |
41498ac5
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 |
380f3545
TO
9 +--------------------------------------------------------------------+
10 */
19b53e5b
C
11namespace Civi\Api4;
12
13/**
14 * CiviCRM settings api.
15 *
16 * Used to read/write persistent setting data from CiviCRM.
17 *
0493ec47 18 * @see \Civi\Core\SettingsBag
aa998597 19 * @searchable none
d44cc3cb 20 * @since 5.19
19b53e5b
C
21 * @package Civi\Api4
22 */
23class Setting extends Generic\AbstractEntity {
24
6764a9d3
CW
25 /**
26 * @param bool $checkPermissions
27 * @return Action\Setting\Get
28 */
29 public static function get($checkPermissions = TRUE) {
30 return (new Action\Setting\Get(__CLASS__, __FUNCTION__))
31 ->setCheckPermissions($checkPermissions);
19b53e5b
C
32 }
33
6764a9d3
CW
34 /**
35 * @param bool $checkPermissions
36 * @return Action\Setting\Set
37 */
38 public static function set($checkPermissions = TRUE) {
39 return (new Action\Setting\Set(__CLASS__, __FUNCTION__))
40 ->setCheckPermissions($checkPermissions);
19b53e5b
C
41 }
42
6764a9d3
CW
43 /**
44 * @param bool $checkPermissions
45 * @return Action\Setting\Revert
46 */
47 public static function revert($checkPermissions = TRUE) {
48 return (new Action\Setting\Revert(__CLASS__, __FUNCTION__))
49 ->setCheckPermissions($checkPermissions);
19b53e5b
C
50 }
51
6764a9d3
CW
52 /**
53 * @param bool $checkPermissions
54 * @return Action\Setting\GetFields
55 */
56 public static function getFields($checkPermissions = TRUE) {
57 return (new Action\Setting\GetFields(__CLASS__, __FUNCTION__))
58 ->setCheckPermissions($checkPermissions);
19b53e5b
C
59 }
60
61}