Merge pull request #19965 from eileenmcnaughton/mem_trxn
[civicrm-core.git] / Civi / Api4 / Setting.php
CommitLineData
19b53e5b
C
1<?php
2
380f3545
TO
3/*
4 +--------------------------------------------------------------------+
41498ac5 5 | Copyright CiviCRM LLC. All rights reserved. |
380f3545 6 | |
41498ac5
TO
7 | This work is published under the GNU AGPLv3 license with some |
8 | permitted exceptions and without any warranty. For full license |
9 | and copyright information, see https://civicrm.org/licensing |
380f3545
TO
10 +--------------------------------------------------------------------+
11 */
12
13/**
14 *
15 * @package CRM
ca5cec67 16 * @copyright CiviCRM LLC https://civicrm.org/licensing
380f3545
TO
17 */
18
19
19b53e5b
C
20namespace Civi\Api4;
21
22/**
23 * CiviCRM settings api.
24 *
25 * Used to read/write persistent setting data from CiviCRM.
26 *
0493ec47 27 * @see \Civi\Core\SettingsBag
09815e9c 28 * @searchable false
19b53e5b
C
29 * @package Civi\Api4
30 */
31class Setting extends Generic\AbstractEntity {
32
6764a9d3
CW
33 /**
34 * @param bool $checkPermissions
35 * @return Action\Setting\Get
36 */
37 public static function get($checkPermissions = TRUE) {
38 return (new Action\Setting\Get(__CLASS__, __FUNCTION__))
39 ->setCheckPermissions($checkPermissions);
19b53e5b
C
40 }
41
6764a9d3
CW
42 /**
43 * @param bool $checkPermissions
44 * @return Action\Setting\Set
45 */
46 public static function set($checkPermissions = TRUE) {
47 return (new Action\Setting\Set(__CLASS__, __FUNCTION__))
48 ->setCheckPermissions($checkPermissions);
19b53e5b
C
49 }
50
6764a9d3
CW
51 /**
52 * @param bool $checkPermissions
53 * @return Action\Setting\Revert
54 */
55 public static function revert($checkPermissions = TRUE) {
56 return (new Action\Setting\Revert(__CLASS__, __FUNCTION__))
57 ->setCheckPermissions($checkPermissions);
19b53e5b
C
58 }
59
6764a9d3
CW
60 /**
61 * @param bool $checkPermissions
62 * @return Action\Setting\GetFields
63 */
64 public static function getFields($checkPermissions = TRUE) {
65 return (new Action\Setting\GetFields(__CLASS__, __FUNCTION__))
66 ->setCheckPermissions($checkPermissions);
19b53e5b
C
67 }
68
69}