Add @searchable annotation to denote which API entities should be visible in Search...
[civicrm-core.git] / Civi / Api4 / Setting.php
1 <?php
2
3 /*
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC. All rights reserved. |
6 | |
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 |
10 +--------------------------------------------------------------------+
11 */
12
13 /**
14 *
15 * @package CRM
16 * @copyright CiviCRM LLC https://civicrm.org/licensing
17 */
18
19
20 namespace Civi\Api4;
21
22 /**
23 * CiviCRM settings api.
24 *
25 * Used to read/write persistent setting data from CiviCRM.
26 *
27 * @see \Civi\Core\SettingsBag
28 * @searchable false
29 * @package Civi\Api4
30 */
31 class Setting extends Generic\AbstractEntity {
32
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);
40 }
41
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);
49 }
50
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);
58 }
59
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);
67 }
68
69 }