Merge pull request #20560 from colemanw/searchable
[civicrm-core.git] / Civi / Api4 / System.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
19b53e5b
C
19namespace Civi\Api4;
20
19b53e5b
C
21/**
22 * A collection of system maintenance/diagnostic utilities.
23 *
aa998597 24 * @searchable none
19b53e5b
C
25 * @package Civi\Api4
26 */
27class System extends Generic\AbstractEntity {
28
6764a9d3
CW
29 /**
30 * @param bool $checkPermissions
31 * @return Action\System\Flush
32 */
33 public static function flush($checkPermissions = TRUE) {
34 return (new Action\System\Flush(__CLASS__, __FUNCTION__))
35 ->setCheckPermissions($checkPermissions);
19b53e5b
C
36 }
37
6764a9d3
CW
38 /**
39 * @param bool $checkPermissions
40 * @return Action\System\Check
41 */
42 public static function check($checkPermissions = TRUE) {
43 return (new Action\System\Check(__CLASS__, __FUNCTION__))
44 ->setCheckPermissions($checkPermissions);
19b53e5b
C
45 }
46
b124f74b
TO
47 /**
48 * @param bool $checkPermissions
49 *
50 * @return Action\System\RotateKey
51 */
52 public static function rotateKey($checkPermissions = TRUE) {
53 return (new Action\System\RotateKey(__CLASS__, __FUNCTION__))
54 ->setCheckPermissions($checkPermissions);
55 }
56
6764a9d3
CW
57 /**
58 * @param bool $checkPermissions
59 * @return Generic\BasicGetFieldsAction
60 */
61 public static function getFields($checkPermissions = TRUE) {
62 return (new Generic\BasicGetFieldsAction(__CLASS__, __FUNCTION__, function() {
19b53e5b 63 return [];
6764a9d3 64 }))->setCheckPermissions($checkPermissions);
19b53e5b
C
65 }
66
f8e87067
MT
67 /**
68 * @param bool $checkPermissions
69 * @return Action\System\ResetPaths
70 */
71 public static function resetPaths($checkPermissions = TRUE) {
72 return (new Action\System\ResetPaths(__CLASS__, __FUNCTION__))
73 ->setCheckPermissions($checkPermissions);
74 }
75
19b53e5b 76}