We have a custom module mymodule
that has the following structure. It basically has a configuration object that we are using in a mymodule_preprocess_node()
call to do some logic and display certain output.
When the module is uninstalled, we noticed that configuration files are not deleted. How would we delete the configurations on uninstall?
What we were thinking, but not sure if that is correct or if we are missing any steps.
function mymodule_uninstall() {
\Drupal::configFactory()->getEditable('mymodule.settings')->delete();
}
mymodule.settings
.