You are here

function configuration_node_types_rebuild in Configuration Management 7

Builds and returns the list of node types activated.

1 call to configuration_node_types_rebuild()
node_configuration_revert in includes/configuration.node.inc
Implements hook_configuration_revert().

File

includes/configuration.node.inc, line 134

Code

function configuration_node_types_rebuild($identifiers, $module_name = 'configuration') {
  $_node_types = (object) array(
    'types' => array(),
    'names' => array(),
  );
  $info_array = call_user_func($module_name . '_configuration_node_info');
  foreach ($info_array as $type => $info) {
    if (in_array($type, $identifiers) || !empty($identifiers) && $identifiers[0] == '#import_all') {
      $info['type'] = $type;
      $_node_types->types[$type] = node_type_set_defaults($info);
      $_node_types->types[$type]->module = 'configuration';
      $_node_types->names[$type] = $info['name'];
    }
  }
  foreach ($_node_types->types as $type => $type_object) {

    // if (!empty($type_object->is_new) || !empty($type_object->disabled_changed)) {
    node_type_save($type_object);

    // }
  }
  node_types_rebuild();
}