hook_node_update

  1. drupal
    1. 8
    2. 7
Versions
7 – 8 hook_node_update($node)

Respond to updates to a node.

This hook is invoked from node_save() after the node is updated in the node table in the database, after the type-specific hook_update() is invoked, and after field_attach_update() is called.

Parameters

$node The node that is being updated.

Related topics

Code

modules/node/node.api.php, line 693

<?php
function hook_node_update($node) {
  db_update('mytable')
    ->fields(array('extra' => $node->extra))
    ->condition('nid', $node->nid)
    ->execute();
}
?>