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