function node_hook

Determines whether a node hook exists.

Parameters

string $type: A string containing the node type.

$hook: A string containing the name of the hook.

Return value

string|false A string containing the function name or FALSE if it isn't found.

8 calls to node_hook()
NodeFormController::form in drupal/core/modules/node/lib/Drupal/node/NodeFormController.php
Overrides Drupal\Core\Entity\EntityFormController::form().
NodeFormController::validate in drupal/core/modules/node/lib/Drupal/node/NodeFormController.php
Overrides Drupal\Core\Entity\EntityFormController::validate().
NodeRenderController::buildContent in drupal/core/modules/node/lib/Drupal/node/NodeRenderController.php
Overrides Drupal\Core\Entity\EntityRenderController::buildContent().
NodeStorageController::attachLoad in drupal/core/modules/node/lib/Drupal/node/NodeStorageController.php
Overrides Drupal\Core\Entity\DatabaseStorageController::attachLoad().
node_add_page in drupal/core/modules/node/node.pages.inc
Page callback: Displays add content links for available content types.

... See full list

File

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

Code

function node_hook($type, $hook) {
  $base = node_type_get_base($type);
  return module_hook($base, $hook) ? $base . '_' . $hook : FALSE;
}