You are here

function node_configuration_disable in Configuration Management 7

Implements hook_configuration_disable().

When a configuration module is disabled, modify any node types it provides so they can be deleted manually through the content types UI.

Parameters

$module: Name of module that has been disabled.

File

includes/configuration.node.inc, line 168

Code

function node_configuration_disable($module) {
  if ($default_types = configuration_get_default('node', $module)) {
    foreach ($default_types as $type_name => $type_info) {
      $type_info = node_type_load($type_name);
      $type_info->module = 'node';
      $type_info->custom = 1;
      $type_info->modified = 1;
      $type_info->locked = 0;
      node_type_save($type_info);
    }
  }
}