1 node.module node_type_delete($type)

Deletes a node type from the database.

Parameters

string $type: The machine-readable name of the node type to be deleted.

File

core/modules/node/node.module, line 628
The core module that allows content to be submitted to the site.

Code

function node_type_delete($type) {
  $info = node_type_get_type($type);
  $config = config('node.type.' . $type);
  $config->delete();
  field_attach_delete_bundle('node', $type);
  module_invoke_all('node_type_delete', $info);

  // Clear the node type cache.
  node_type_cache_reset();
}