function node_type_load in Drupal 8
Same name and namespace in other branches
- 7 modules/node/node.module \node_type_load()
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.0.0 and is removed from drupal:9.0.0. Use \Drupal\node\Entity\NodeType::load().
See also
https://www.drupal.org/node/2266845
1 call to node_type_load()
- NodeLegacyTest::testEntityLegacyCode in core/
modules/ node/ tests/ src/ Kernel/ NodeLegacyTest.php - @expectedDeprecation node_load_multiple() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\node\Entity\Node::loadMultiple(). See https://www.drupal.org/node/2266845 @expectedDeprecation node_load() is deprecated in…
File
- core/
modules/ node/ node.module, line 342 - The core module that allows content to be submitted to the site.
Code
function node_type_load($name) {
@trigger_error('node_type_load() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \\Drupal\\node\\Entity\\NodeType::load(). See https://www.drupal.org/node/2266845', E_USER_DEPRECATED);
return NodeType::load($name);
}