You are here

public function SensorResult::addStatusMessage in Monitoring 8

Same name and namespace in other branches
  1. 7 lib/Drupal/monitoring/Result/SensorResult.php \Drupal\monitoring\Result\SensorResult::addStatusMessage()

Adds sensor status message.

Multiple status messages can be added to a single result and will be added to the final status message.

Parameters

string $message: Message to be set.

array $variables: Dynamic values to be replaced for placeholders in the message.

Overrides SensorResultInterface::addStatusMessage

See also

\Drupal\monitoring\Result\SensorResultInterface::setMessage()

File

src/Result/SensorResult.php, line 172

Class

SensorResult
Generic container for the sensor result.

Namespace

Drupal\monitoring\Result

Code

public function addStatusMessage($message, array $variables = array()) {
  $this->statusMessages[] = array(
    'message' => $message,
    'variables' => $variables,
  );
}