You are here

public function SensorResult::setMessage in Monitoring 8

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

Sets the final result message.

If this is set, then the compilation will not extend the message in any way and the sensor completely responsible for making sure that all relevant information like the sensor value is part of the message.

Parameters

string $message: Message to be set.

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

Overrides SensorResultInterface::setMessage

File

src/Result/SensorResult.php, line 162

Class

SensorResult
Generic container for the sensor result.

Namespace

Drupal\monitoring\Result

Code

public function setMessage($message, array $variables = array()) {
  $this->sensorMessage = array(
    'message' => $message,
    'variables' => $variables,
  );
}