function 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

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

11 calls to node_type_load()
BareStandardUpgradePathTest::testBasicStandardUpgrade in drupal/core/modules/system/lib/Drupal/system/Tests/Upgrade/BareStandardUpgradePathTest.php
Tests a successful major version release upgrade.
comment_node_type_load in drupal/core/modules/comment/comment.module
Loads the comment bundle name corresponding a given content type.
FilledStandardUpgradePathTest::testFilledStandardUpgrade in drupal/core/modules/system/lib/Drupal/system/Tests/Upgrade/FilledStandardUpgradePathTest.php
Tests a successful point release update.
forum_form in drupal/core/modules/forum/forum.module
Implements hook_form().
hook_form in drupal/core/modules/node/node.api.php
Display a node editing form.

... See full list

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

File

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

Code

function node_type_load($name) {
  $types = _node_types_build()->types;
  return isset($types[$name]) ? $types[$name] : FALSE;
}