node_type_get_name

  1. drupal
    1. 8
    2. 7
Versions
7 – 8 node_type_get_name($node)

Returns the node type name of the passed node or node type string.

Parameters

$node A node object or string that indicates the node type to return.

Return value

The node type name or FALSE if the node type is not found.

▾ 26 functions call node_type_get_name()

action_example_node_sticky_action in examples/action_example/action_example.module
Action function for action_example_node_sticky_action.
forum_menu_local_tasks_alter in modules/forum/forum.module
Implements hook_menu_local_tasks_alter().
hook_mail in modules/system/system.api.php
Prepare a message based on parameters; called from drupal_mail().
hook_search_execute in modules/search/search.api.php
Execute a search for a set of key words.
NodeTypeTestCase::testNodeTypeGetFunctions in modules/node/node.test
Ensure that node type functions (node_type_get_*) work correctly.
node_admin_nodes in modules/node/node.admin.inc
Form builder: Builds the node administration overview.
node_assign_owner_action in modules/node/node.module
Assigns ownership of a node to a user.
node_delete_confirm_submit in modules/node/node.pages.inc
Execute node deletion
node_form_submit in modules/node/node.pages.inc
node_help in modules/node/node.module
Implements hook_help().
node_make_sticky_action in modules/node/node.module
Sets the sticky-at-top-of-list property of a node to 1.
node_make_unsticky_action in modules/node/node.module
Sets the sticky-at-top-of-list property of a node to 0.
node_page_edit in modules/node/node.pages.inc
Menu callback; presents the node editing form.
node_promote_action in modules/node/node.module
Sets the promote property of a node to 1.
node_publish_action in modules/node/node.module
Sets the status of a node to 1 (published).
node_revision_delete_confirm_submit in modules/node/node.pages.inc
node_revision_revert_confirm_submit in modules/node/node.pages.inc
node_save_action in modules/node/node.module
Saves a node.
node_search_execute in modules/node/node.module
Implements hook_search_execute().
node_tokens in modules/node/node.tokens.inc
Implements hook_tokens().
node_unpromote_action in modules/node/node.module
Sets the promote property of a node to 0.
node_unpublish_action in modules/node/node.module
Sets the status of a node to 0 (unpublished).
node_unpublish_by_keyword_action in modules/node/node.module
Unpublishes a node containing certain keywords.
PollTestCase::pollCreate in modules/poll/poll.test
Creates a poll.
PollTestCase::pollUpdate in modules/poll/poll.test
tracker_page in modules/tracker/tracker.pages.inc
Menu callback; prints a listing of active nodes on the site.

Code

modules/node/node.module, line 450

<?php
function node_type_get_name($node) {
  $type = _node_extract_type($node);
  $types = _node_types_build()->names;
  return isset($types[$type]) ? $types[$type] : FALSE;
}
?>