W3cubDocs

/Drupal 8

function node_type_load

node_type_load($name)

Menu argument loader: Loads a node type by string.

Parameters

$name: The machine name of a node type to load.

Return value

\Drupal\node\NodeTypeInterface A node type object or NULL if $name does not exist.

Deprecated

in Drupal 8.x, will be removed before Drupal 9.0. Use \Drupal\node\Entity\NodeType::load().

File

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

Code

function node_type_load($name) {
  return NodeType::load($name);
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!node!node.module/function/node_type_load/8.1.x