2 namespace Civi\Api4\Action\System
;
5 * Retrieve system notices, warnings, errors, etc.
7 class Check
extends \Civi\Api4\Generic\BasicGetAction
{
9 protected function getRecords() {
11 foreach (\CRM_Utils_Check
::checkAll() as $message) {
12 $messages[] = $message->toArray();
17 public static function fields() {
22 'description' => 'Unique identifier',
23 'data_type' => 'String',
28 'description' => 'Short title text',
29 'data_type' => 'String',
34 'description' => 'Long description html',
35 'data_type' => 'String',
40 'description' => 'Optional extra help (html string)',
41 'data_type' => 'String',
45 'description' => 'crm-i class of icon to display with message',
46 'data_type' => 'String',
50 'title' => 'Severity',
51 'description' => 'Psr\Log\LogLevel string',
52 'data_type' => 'String',
53 'options' => array_combine(\CRM_Utils_Check
::getSeverityList(), \CRM_Utils_Check
::getSeverityList()),
56 'name' => 'severity_id',
57 'title' => 'Severity ID',
58 'description' => 'Integer representation of Psr\Log\LogLevel',
59 'data_type' => 'Integer',
60 'options' => \CRM_Utils_Check
::getSeverityList(),
63 'name' => 'is_visible',
64 'title' => 'is visible',
65 'description' => '0 if message has been hidden by the user',
66 'data_type' => 'Boolean',
69 'name' => 'hidden_until',
70 'title' => 'Hidden until',
71 'description' => 'When will hidden message be visible again?',
72 'data_type' => 'Date',
77 'description' => 'List of actions user can perform',
78 'data_type' => 'Array',