You are here

protected function StateValueSensorPlugin::getState in Monitoring 8

Gets state.

Return value

\Drupal\Core\KeyValueStore\KeyValueStoreInterface The state.

1 call to StateValueSensorPlugin::getState()
StateValueSensorPlugin::getValue in src/Plugin/monitoring/SensorPlugin/StateValueSensorPlugin.php
Gets the current value.

File

src/Plugin/monitoring/SensorPlugin/StateValueSensorPlugin.php, line 53
Contains \Drupal\monitoring\Plugin\monitoring\SensorPlugin\StateValueSensorPlugin

Class

StateValueSensorPlugin
Generic sensor that checks for a state value.

Namespace

Drupal\monitoring\Plugin\monitoring\SensorPlugin

Code

protected function getState() {
  return $this
    ->getService('state');
}