You are here

public function SensorResult::addStatusMessage in Monitoring 7

Same name and namespace in other branches
  1. 8 src/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

self::setMessage()

File

lib/Drupal/monitoring/Result/SensorResult.php, line 161
Contains \Drupal\monitoring\Result\SensorResult.

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,
  );
}