You are here

protected function SensorDatabaseAggregator::getTimeIntervalOptions in Monitoring 7

Returns time interval options.

Return value

array Array with time interval options, keyed by time interval in seconds.

1 call to SensorDatabaseAggregator::getTimeIntervalOptions()
SensorDatabaseAggregator::settingsForm in lib/Drupal/monitoring/Sensor/Sensors/SensorDatabaseAggregator.php
Gets settings form for a specific sensor.

File

lib/Drupal/monitoring/Sensor/Sensors/SensorDatabaseAggregator.php, line 270
Contains \Drupal\monitoring\Sensor\Sensors\SensorDatabaseAggregator.

Class

SensorDatabaseAggregator
Base for database aggregator sensors.

Namespace

Drupal\monitoring\Sensor\Sensors

Code

protected function getTimeIntervalOptions() {
  return drupal_map_assoc(array(
    600,
    900,
    1800,
    3600,
    7200,
    10800,
    21600,
    32400,
    43200,
    64800,
    86400,
    172800,
    259200,
    604800,
    1209600,
    2419200,
  ), 'format_interval') + array(
    0 => t('No restriction'),
  );
}