Skip to content
Snippets Groups Projects
Commit e9226a80 authored by Patrick Kenny's avatar Patrick Kenny
Browse files

Issue #3446634 by ptmkenny: On log page, invalid enum value

parent c8e42bfb
No related branches found
No related tags found
Loading
Pipeline #170505 passed with warnings
......@@ -59,11 +59,7 @@ class FirebasePhpConfigurationForm extends ConfigFormBase {
'#type' => 'select',
'#title' => $this->t('Logging Level'),
'#description' => $this->t('Choose the level of detail to be logged to Drupal.'),
'#options' => [
LoggingLevel::Debug->value,
LoggingLevel::Standard->value,
LoggingLevel::None->value,
],
'#options' => $this->getLoggingOptions(),
'#default_value' => $config->get(FirebasePhpSettings::LoggingLevel->value),
'#required' => TRUE,
];
......@@ -111,4 +107,18 @@ class FirebasePhpConfigurationForm extends ConfigFormBase {
}
/**
* Get the logging level options.
*
* @return array
* List of options, keyed by logging level.
*/
protected function getLoggingOptions(): array {
return [
LoggingLevel::Debug->value => LoggingLevel::Debug->value,
LoggingLevel::Standard->value => LoggingLevel::Standard->value,
LoggingLevel::None->value => LoggingLevel::None->value,
];
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment