1 node.module node_type_load($name)

Menu argument loader: Loads a node type by string.

Parameters

$name: The machine-readable name of a node type to load, where '_' is replaced with '-'.

Return value

stdClass|FALSE: A node type object or FALSE if $name does not exist.

File

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

Code

function node_type_load($name) {
  return node_type_get_type(strtr($name, array('-' => '_')));
}