Submit callback for tmgmt_settings_form.
function tmgmt_local_form_tmgmt_settings_form_submit($form, FormStateInterface $form_state) {
$config = \Drupal::configFactory()
->getEditable('tmgmt_local.settings');
if ($config
->get('use_admin_theme') != $form_state
->getValue('use_admin_theme')) {
$config
->set('use_admin_theme', $form_state
->getValue('use_admin_theme'))
->save();
\Drupal::service('router.builder')
->rebuild();
}
$config
->set('allow_all', $form_state
->getValue('allow_all'))
->save();
}