node_type_get_type
- Versions
- 7
node_type_get_type($node)
Returns the node type of the passed node or node type string.
<?php
array(
'type' => 'Machine readable type name',
'name' => 'Name of the node type',
'base' => 'Indicates to which module this node type belongs',
'description' => 'Description of the node type',
// ...
)
?>
Parameters
$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 array with following content:
Code
modules/node/node.module, line 374
<?php
function node_type_get_type($node) {
$type = _node_extract_type($node);
$types = _node_types_build()->types;
return isset($types[$type]) ? $types[$type] : FALSE;
}
?>Login or register to post comments 