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
1 2 3 | function node_type_load( $name ) { return NodeType::load( $name ); } |
Please login to continue.