4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC. All rights reserved. |
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 +--------------------------------------------------------------------+
16 * @copyright CiviCRM LLC https://civicrm.org/licensing
21 namespace Civi\Api4\Action\System
;
24 * Retrieve system notices, warnings, errors, etc.
26 class Check
extends \Civi\Api4\Generic\BasicGetAction
{
28 protected function getRecords() {
30 foreach (\CRM_Utils_Check
::checkAll() as $message) {
31 $messages[] = $message->toArray();
36 public static function fields() {
41 'description' => 'Unique identifier',
42 'data_type' => 'String',
47 'description' => 'Short title text',
48 'data_type' => 'String',
53 'description' => 'Long description html',
54 'data_type' => 'String',
59 'description' => 'Optional extra help (html string)',
60 'data_type' => 'String',
64 'description' => 'crm-i class of icon to display with message',
65 'data_type' => 'String',
69 'title' => 'Severity',
70 'description' => 'Psr\Log\LogLevel string',
71 'data_type' => 'String',
72 'options' => array_combine(\CRM_Utils_Check
::getSeverityList(), \CRM_Utils_Check
::getSeverityList()),
75 'name' => 'severity_id',
76 'title' => 'Severity ID',
77 'description' => 'Integer representation of Psr\Log\LogLevel',
78 'data_type' => 'Integer',
79 'options' => \CRM_Utils_Check
::getSeverityList(),
82 'name' => 'is_visible',
83 'title' => 'is visible',
84 'description' => '0 if message has been hidden by the user',
85 'data_type' => 'Boolean',
88 'name' => 'hidden_until',
89 'title' => 'Hidden until',
90 'description' => 'When will hidden message be visible again?',
91 'data_type' => 'Date',
96 'description' => 'List of actions user can perform',
97 'data_type' => 'Array',