1 node.module _node_extract_type($node)

Extracts the type name.

Parameters

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

Return value

string: Node type of the passed-in data.

File

core/modules/node/node.module, line 381
The core module that allows content to be submitted to the site.

Code

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