1.20.x node_test.module node_test_node_update(Node $node)

Implements hook_node_update().

File

modules/node/tests/node_test/node_test.module, line 145
A dummy module for testing node related hooks.

Code

function node_test_node_update(Node $node) {
  // Determine changes on update.
  if (!empty($node->original) && $node->original->title == 'test_changes') {
    if ($node->original->title != $node->title) {
      $node->title .= '_update';
    }
  }
}