function node_type_get_base

node_type_get_base($node)

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

The base indicates which module implements this node type and is used to execute node-type-specific hooks. For types defined in the user interface and managed by node.module, the base is 'node_content'.

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.

See also

node_invoke()

File

modules/node/node.module, line 431
The core that allows content to be submitted to the site. Modules and scripts may programmatically submit nodes using the usual form API pattern.

Code

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;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!node!node.module/function/node_type_get_base/7.x