diff --git a/core/lib/Drupal/Core/Form/ConfigFormBase.php b/core/lib/Drupal/Core/Form/ConfigFormBase.php index 77f8af970f..ce69474557 100644 --- a/core/lib/Drupal/Core/Form/ConfigFormBase.php +++ b/core/lib/Drupal/Core/Form/ConfigFormBase.php @@ -44,8 +44,8 @@ public function buildForm(array $form, FormStateInterface $form_state) { // By default, render the form using system-config-form.html.twig. $form['#theme'] = 'system_config_form'; - // Add a post build callback so any form elements that #config_data_source - // blah @todo + // Add a post build callback so any properties that #config_data_source + // overrides can be marked as overridden. $form['#after_build'][] = '::checkConfigOverrides'; return $form; diff --git a/core/lib/Drupal/Core/Form/ConfigFormBaseTrait.php b/core/lib/Drupal/Core/Form/ConfigFormBaseTrait.php index 7a6b89dc8d..fcf8ba6681 100644 --- a/core/lib/Drupal/Core/Form/ConfigFormBaseTrait.php +++ b/core/lib/Drupal/Core/Form/ConfigFormBaseTrait.php @@ -85,7 +85,7 @@ public function checkConfigOverrides(array $element, FormStateInterface $form_st '#theme' => 'config_overrides', '#overrides' => $overrides, ]; - drupal_set_message(\Drupal::service('renderer')->render($override_output)); + drupal_set_message(\Drupal::service('renderer')->render($override_output), 'warning'); } } return $element; @@ -118,8 +118,8 @@ protected function getConfigOverrides(array $element, array $overrides = []) { if ($value !== $original_value) { // There is an override. $overrides[$name][$key] = [ - 'original' => $original_value, - 'override' => $value + 'original' => var_export($original_value, TRUE), + 'override' => var_export($value, TRUE), // It'd be nice to link back to the form element - probably need the // element key and parents. // 'form_element' =>