public function SensorResult::setMessage in Monitoring 7
Same name and namespace in other branches
- 8 src/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
See also
File
- lib/
Drupal/ monitoring/ Result/ SensorResult.php, line 151 - Contains \Drupal\monitoring\Result\SensorResult.
Class
- SensorResult
- Generic container for the sensor result.
Namespace
Drupal\monitoring\ResultCode
public function setMessage($message, array $variables = array()) {
$this->sensorMessage = array(
'message' => $message,
'variables' => $variables,
);
}