function _node_extract_type

Extracts 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 calls to _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.

File

modules/node/node.module, line 378

Code

function _node_extract_type($node) {
  return is_object($node) ? $node->type : $node;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.