public function SensorManager::getEnabledSensorInfo in Monitoring 7
Returns monitoring sensor info for enabled sensors.
Return value
\Drupal\monitoring\Sensor\SensorInfo[] List of SensorInfo instances.
File
- lib/
Drupal/ monitoring/ Sensor/ SensorManager.php, line 48 - Contains \Drupal\monitoring\Sensor\SensorManager.
Class
- SensorManager
- Manages sensor definitions and settings.
Namespace
Drupal\monitoring\SensorCode
public function getEnabledSensorInfo() {
$enabled_sensors = array();
foreach ($this
->getSensorInfo() as $sensor_info) {
if ($sensor_info
->isEnabled()) {
$enabled_sensors[$sensor_info
->getName()] = $sensor_info;
}
}
return $enabled_sensors;
}