_node_extract_type

Versions
7
_node_extract_type($node)

Extract the type name.

Parameters

$node Either a string or object, containing the node type information.

Return value

Node type of the passed in data.

▾ 3 functions call _node_extract_type()

node_type_get_base in modules/node/node.module
Returns the node type base of the passed node or node type string.
node_type_get_name in modules/node/node.module
Returns the node type name of the passed node or node type string.
node_type_get_type in modules/node/node.module
Returns the node type of the passed node or node type string.

Code

modules/node/node.module, line 367

<?php
function _node_extract_type($node) {
  return is_object($node) ? $node->type : $node;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.