Merge pull request #19010 from colemanw/bridges
[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
19b53e5b
C
28 * @package Civi\Api4
29 */
30class Setting extends Generic\AbstractEntity {
31
6764a9d3
CW
32 /**
33 * @param bool $checkPermissions
34 * @return Action\Setting\Get
35 */
36 public static function get($checkPermissions = TRUE) {
37 return (new Action\Setting\Get(__CLASS__, __FUNCTION__))
38 ->setCheckPermissions($checkPermissions);
19b53e5b
C
39 }
40
6764a9d3
CW
41 /**
42 * @param bool $checkPermissions
43 * @return Action\Setting\Set
44 */
45 public static function set($checkPermissions = TRUE) {
46 return (new Action\Setting\Set(__CLASS__, __FUNCTION__))
47 ->setCheckPermissions($checkPermissions);
19b53e5b
C
48 }
49
6764a9d3
CW
50 /**
51 * @param bool $checkPermissions
52 * @return Action\Setting\Revert
53 */
54 public static function revert($checkPermissions = TRUE) {
55 return (new Action\Setting\Revert(__CLASS__, __FUNCTION__))
56 ->setCheckPermissions($checkPermissions);
19b53e5b
C
57 }
58
6764a9d3
CW
59 /**
60 * @param bool $checkPermissions
61 * @return Action\Setting\GetFields
62 */
63 public static function getFields($checkPermissions = TRUE) {
64 return (new Action\Setting\GetFields(__CLASS__, __FUNCTION__))
65 ->setCheckPermissions($checkPermissions);
19b53e5b
C
66 }
67
68}