function node_type_load

Same name in other branches
  1. 8.9.x core/modules/node/node.module \node_type_load()

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

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

1 string reference to 'node_type_load'
node_type_form in modules/node/content_types.inc
Form constructor for the node type editing form.

File

modules/node/node.module, line 489

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.