You are here

public function SensorManager::getAllSensorConfig in Monitoring 8

Returns monitoring sensor config.

Return value

\Drupal\monitoring\Entity\SensorConfig[] List of SensorConfig instances.

2 calls to SensorManager::getAllSensorConfig()
SensorManager::getEnabledSensorConfig in src/Sensor/SensorManager.php
Returns monitoring sensor config for enabled sensors.
SensorManager::getSensorConfigByCategories in src/Sensor/SensorManager.php
Gets sensor config grouped by categories.

File

src/Sensor/SensorManager.php, line 103
Contains \Drupal\monitoring\Sensor\SensorManager.

Class

SensorManager
Manages sensor definitions and settings.

Namespace

Drupal\monitoring\Sensor

Code

public function getAllSensorConfig() {
  $sensors = SensorConfig::loadMultiple();

  // Sort the sensors by category and label.
  uasort($sensors, "\\Drupal\\monitoring\\Entity\\SensorConfig::sort");
  return $sensors;
}