| 7 node.api.php | hook_node_update($node) |
| 8 node.api.php | hook_node_update(Drupal node Node $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
Drupal\node\Node $node: The node that is being updated.
Related topics
11 functions implement hook_node_update()
File
- core/
modules/ node/ node.api.php, line 706 - Hooks provided by the Node module.
Code
function hook_node_update(Drupal node Node $node) {
db_update('mytable')
->fields(array('extra' => $node->extra))
->condition('nid', $node->nid)
->execute();
}
Login or register to post comments