function node_type_get_base

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

string $type: A string that indicates the node type to return.

Return value

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

See also

node_invoke()

2 calls to node_type_get_base()
NodeTypeTest::testNodeTypeGetFunctions in drupal/core/modules/node/lib/Drupal/node/Tests/NodeTypeTest.php
Ensures that node type functions (node_type_get_*) work correctly.
node_hook in drupal/core/modules/node/node.module
Determines whether a node hook exists.

File

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

Code

function node_type_get_base($type) {
  $types = _node_types_build()->types;
  return isset($types[$type]) && isset($types[$type]->base) ? $types[$type]->base : FALSE;
}