You are here

public function SensorResult::setPreviousResult in Monitoring 8

Sets the previous sensor result.

Parameters

\Drupal\monitoring\Entity\SensorResultDataInterface|null $previous_result: A SensorResultEntity representing the previous sensor result to set. NULL if there is no previous result.

Overrides SensorResultInterface::setPreviousResult

File

src/Result/SensorResult.php, line 528

Class

SensorResult
Generic container for the sensor result.

Namespace

Drupal\monitoring\Result

Code

public function setPreviousResult(SensorResultDataInterface $previous_result = NULL) {
  $this->previousResult = $previous_result;
}