public function SensorConfigurable::settingsForm in Monitoring 7
Gets settings form for a specific sensor.
Parameters
$form: Drupal $form structure.
array $form_state: Drupal $form_state object. Carrying the string sensor_name.
Return value
array Drupal form structure.
Overrides SensorConfigurableInterface::settingsForm
5 calls to SensorConfigurable::settingsForm()
- SensorDisappearedSensors::settingsForm in lib/
Drupal/ monitoring/ Sensor/ Sensors/ SensorDisappearedSensors.php - Adds UI to clear the missing sensor status.
- SensorEnabledModules::settingsForm in lib/
Drupal/ monitoring/ Sensor/ Sensors/ SensorEnabledModules.php - Gets settings form for a specific sensor.
- SensorGitDirtyTree::settingsForm in lib/
Drupal/ monitoring/ Sensor/ Sensors/ SensorGitDirtyTree.php - Gets settings form for a specific sensor.
- SensorThresholds::settingsForm in lib/
Drupal/ monitoring/ Sensor/ SensorThresholds.php - Gets settings form for a specific sensor.
- SensorVariable::settingsForm in lib/
Drupal/ monitoring/ Sensor/ Sensors/ SensorVariable.php - Gets settings form for a specific sensor.
5 methods override SensorConfigurable::settingsForm()
- SensorDisappearedSensors::settingsForm in lib/
Drupal/ monitoring/ Sensor/ Sensors/ SensorDisappearedSensors.php - Adds UI to clear the missing sensor status.
- SensorEnabledModules::settingsForm in lib/
Drupal/ monitoring/ Sensor/ Sensors/ SensorEnabledModules.php - Gets settings form for a specific sensor.
- SensorGitDirtyTree::settingsForm in lib/
Drupal/ monitoring/ Sensor/ Sensors/ SensorGitDirtyTree.php - Gets settings form for a specific sensor.
- SensorThresholds::settingsForm in lib/
Drupal/ monitoring/ Sensor/ SensorThresholds.php - Gets settings form for a specific sensor.
- SensorVariable::settingsForm in lib/
Drupal/ monitoring/ Sensor/ Sensors/ SensorVariable.php - Gets settings form for a specific sensor.
File
- lib/
Drupal/ monitoring/ Sensor/ SensorConfigurable.php, line 22 - Contains \Drupal\monitoring\Sensor\SensorConfigurable.
Class
- SensorConfigurable
- Abstract configurable sensor class.
Namespace
Drupal\monitoring\SensorCode
public function settingsForm($form, &$form_state) {
// If sensor provides settings form, automatically provide settings to
// enable the sensor.
$form['enabled'] = array(
'#type' => 'checkbox',
'#title' => t('Enabled'),
'#description' => t('Check to have the sensor trigger.'),
'#default_value' => $this
->isEnabled(),
);
return $form;
}