function node_type_get_name
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.
25 calls to node_type_get_name()
- 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 - Ensures 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.
File
-
modules/
node/ node.module, line 459
Code
function node_type_get_name($node) {
$type = _node_extract_type($node);
$types = _node_types_build()->names;
return isset($types[$type]) ? $types[$type] : FALSE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.