Application State

The application state refers to the notifications displayed in the "Site Settings / System Status" section.

In this section, the system reports errors in the server and application settings that occurred during the verification process.

Notifications can have the following types:

  • Red (Error) - a critical error that requires immediate correction. If there are critical errors, the update installation is not available.
  • Yellow (Warning) - a recommendation that can improve/speed up the project's work.
  • Gray (Notice) - an optional recommendation that does not affect the overall functioning of the project.

Notification Installation

Each module and extension can also report their errors in this section using the following built-in functions:

$this->systemError('key1', 'Error text that requires correction');
$this->systemWarning('key2', 'Warning text');
$this->systemNotice('key3', 'Recommendation text');

The first parameter takes a unique text key for the message, and the second parameter is the message text. Thus, messages are added, and they can be deleted by calling the following function:

$this->systemResolve('key1');

As you can see, you need to know the key that was previously used in the method setting the error. There is also a method called during the system check process:

public function systemCheck()
{
    $this->systemResolve('key1');
}

By declaring such a method in a module or extension, additional checks can be performed, and outdated messages set earlier can be removed.

If an extension has set messages and has been disabled/removed, all its messages will be automatically removed during the next system check.