1 config.inc config_uninstall_config($module, $config_name = NULL)

Uninstall all the configuration provided by a module.

File

core/includes/config.inc, line 280
This is the API for configuration storage.

Code

function config_uninstall_config($module, $config_name = NULL) {
  backdrop_load('module', $module);
  if ($configs = module_invoke($module, 'config_info')) {
    foreach ($configs as $config_name => $config_info) {
      if (isset($config_info['name_key'])) {
        $sub_names = config_get_names_with_prefix($config_name . '.');
        foreach ($sub_names as $sub_name) {
          config($sub_name)->delete();
        }
      }
      else {
        config($config_name)->delete();
      }
    }
  }
}