function node_type_get_label

Returns the node type label for the passed node type name.

Parameters

string $name: The machine name of a node type.

Return value

string|false The node type label or FALSE if the node type is not found.

5 calls to node_type_get_label()
forum_menu_local_tasks in drupal/core/modules/forum/forum.module
Implements hook_menu_local_tasks().
NodeTypeTest::testNodeTypeGetFunctions in drupal/core/modules/node/lib/Drupal/node/Tests/NodeTypeTest.php
Ensures that node type functions (node_type_get_*) work correctly.
node_help in drupal/core/modules/node/node.module
Implements hook_help().
Type::node_type in drupal/core/modules/node/lib/Drupal/node/Plugin/views/argument/Type.php
Type::render_name in drupal/core/modules/node/lib/Drupal/node/Plugin/views/field/Type.php
Render node type as human readable name, unless using machine_name option.

File

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

Code

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