Skip to content
Snippets Groups Projects
Commit 42ed451a authored by Melissa Miller's avatar Melissa Miller
Browse files

set site name value back to system.site on form submit

parent 19182e61
No related merge requests found
......@@ -220,6 +220,8 @@ class ModuleConfigurationForm extends ConfigFormBase {
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
$values = $form_state->getValues();
//set config values unique to this module
$this->config('wcm8_siteinfo.settings')
->set('prefix', $values['prefix'])
->set('admin_link', $values['admin_link'])
......@@ -240,8 +242,12 @@ class ModuleConfigurationForm extends ConfigFormBase {
->set('instagram', $values['instagram'])
->set('photos', $values['photos'])
->save();
//set site name value back to system.site
$this->configFactory->getEditable('system.site')
->set('name', $values['site_name'])
->save();
parent::submitForm($form, $form_state);
}
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment