node_type_get_base

Versions
7
node_type_get_base($node)

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

The base indicates which module implement this node type and is used to execute node type specific hooks.

See also

node_invoke()

Parameters

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

Return value

The node type base or FALSE if the node type is not found.

▾ 2 functions call node_type_get_base()

node_hook in modules/node/node.module
Determine whether a node hook exists.
node_invoke in modules/node/node.module
Invoke a node hook.

Code

modules/node/node.module, line 406

<?php
function node_type_get_base($node) {
  $type = _node_extract_type($node);
  $types = _node_types_build()->types;
  return isset($types[$type]) && isset($types[$type]->base) ? $types[$type]->base : FALSE;
}
?>
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.