You are here

function node_configuration_revert in Configuration Management 7

Implements hook_configuration_revert().

Parameters

$module: name of module to revert content for

File

includes/configuration.node.inc, line 107

Code

function node_configuration_revert($identifiers, $module_name = 'configuration') {
  if ($default_types = configuration_get_default('node', $module_name)) {
    foreach ($default_types as $type_name => $type_info) {

      // Delete node types
      // We don't use node_type_delete() because we do not actually
      // want to delete the node type (and invoke hook_node_type()).
      // This can lead to bad consequences like CCK deleting field
      // storage in the DB.
      if (in_array($type_name, $identifiers)) {
        db_delete('node_type')
          ->condition('type', $type_name)
          ->execute();
      }
    }
    configuration_node_types_rebuild($identifiers, $module_name);
    menu_rebuild();
    foreach ($default_types as $type_name => $type_info) {
      configuration_check_node($type_name);
    }
    cache_clear_all('config_export', 'cache');
  }
}