4 +--------------------------------------------------------------------+
6 +--------------------------------------------------------------------+
7 | Copyright CiviCRM LLC (c) 2004-2020 |
8 +--------------------------------------------------------------------+
9 | This file is a part of CiviCRM. |
11 | CiviCRM is free software; you can copy, modify, and distribute it |
12 | under the terms of the GNU Affero General Public License |
13 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
15 | CiviCRM is distributed in the hope that it will be useful, but |
16 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. |
20 | You should have received a copy of the GNU Affero General Public |
21 | License and the CiviCRM Licensing Exception along |
22 | with this program; if not, contact CiviCRM LLC |
23 | at info[AT]civicrm[DOT]org. If you have questions about the |
24 | GNU Affero General Public License or the licensing of CiviCRM, |
25 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
26 +--------------------------------------------------------------------+
32 * @copyright CiviCRM LLC (c) 2004-2020
37 namespace Civi\Api4\Action\System
;
40 * Retrieve system notices, warnings, errors, etc.
42 class Check
extends \Civi\Api4\Generic\BasicGetAction
{
44 protected function getRecords() {
46 foreach (\CRM_Utils_Check
::checkAll() as $message) {
47 $messages[] = $message->toArray();
52 public static function fields() {
57 'description' => 'Unique identifier',
58 'data_type' => 'String',
63 'description' => 'Short title text',
64 'data_type' => 'String',
69 'description' => 'Long description html',
70 'data_type' => 'String',
75 'description' => 'Optional extra help (html string)',
76 'data_type' => 'String',
80 'description' => 'crm-i class of icon to display with message',
81 'data_type' => 'String',
85 'title' => 'Severity',
86 'description' => 'Psr\Log\LogLevel string',
87 'data_type' => 'String',
88 'options' => array_combine(\CRM_Utils_Check
::getSeverityList(), \CRM_Utils_Check
::getSeverityList()),
91 'name' => 'severity_id',
92 'title' => 'Severity ID',
93 'description' => 'Integer representation of Psr\Log\LogLevel',
94 'data_type' => 'Integer',
95 'options' => \CRM_Utils_Check
::getSeverityList(),
98 'name' => 'is_visible',
99 'title' => 'is visible',
100 'description' => '0 if message has been hidden by the user',
101 'data_type' => 'Boolean',
104 'name' => 'hidden_until',
105 'title' => 'Hidden until',
106 'description' => 'When will hidden message be visible again?',
107 'data_type' => 'Date',
111 'title' => 'Actions',
112 'description' => 'List of actions user can perform',
113 'data_type' => 'Array',