function node_type_get_type

cis7 node.module node_type_get_type($node)
cle7 node.module node_type_get_type($node)
elmsmedia7 node.module node_type_get_type($node)
icor7 node.module node_type_get_type($node)
meedjum_blog7 node.module node_type_get_type($node)
mooc7 node.module node_type_get_type($node)

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


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

Return value

A single node type, as an object, or FALSE if the node type is not found. The node type is an object containing fields from hook_node_info() return values, as well as the field 'type' (the machine-readable type) and other fields used internally and defined in _node_types_build(), hook_node_info(), and node_type_set_defaults().

24 calls to node_type_get_type()
comment_node_type_load in modules/comment/comment.module
Menu loader callback for Field UI paths.
ctools_node_title_content_type_render in sites/all/modules/ulmus/ctools/plugins/content_types/node_context/
Render the custom content type.
ctools_node_type_desc_content_type_render in sites/all/modules/ulmus/ctools/plugins/content_types/node_context/
Output function for the 'node' content type. Outputs a node based on the module and delta supplied in the configuration.
devel_generate_content_add_node in sites/all/modules/ulmus/devel/devel_generate/
Create one node. Used by both batch and non-batch code branches.
devel_node_access_block_view in sites/all/modules/ulmus/devel/devel_node_access.module
Implements hook_block_view().

... See full list


modules/node/node.module, line 410
The core that allows content to be submitted to the site. Modules and scripts may programmatically submit nodes using the usual form API pattern.


function node_type_get_type($node) {
  $type = _node_extract_type($node);
  $types = _node_types_build()->types;
  return isset($types[$type]) ? $types[$type] : FALSE;