public function CoreRequirementsSensorPlugin::submitConfigurationForm in Monitoring 8
Form submission handler.
Parameters
array $form: An associative array containing the structure of the plugin form as built by static::buildConfigurationForm().
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Calling code should pass on a subform state created through \Drupal\Core\Form\SubformState::createForSubform().
Overrides SensorPluginBase::submitConfigurationForm
File
- src/
Plugin/ monitoring/ SensorPlugin/ CoreRequirementsSensorPlugin.php, line 309 - Contains \Drupal\monitoring\Plugin\monitoring\SensorPlugin\CoreRequirementsSensorPlugin.
Class
- CoreRequirementsSensorPlugin
- Monitors a specific module hook_requirements.
Namespace
Drupal\monitoring\Plugin\monitoring\SensorPluginCode
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
$keys = array_filter(explode("\n", $form_state
->getValue(array(
'settings',
'exclude_keys',
))));
$keys = array_map('trim', $keys);
$this->sensorConfig->settings['exclude_keys'] = $keys;
}