You are here

function acl_node_test_node_presave in ACL 8

Same name and namespace in other branches
  1. 7 tests/acl_node_test.module \acl_node_test_node_presave()

Implements hook_node_presave().

File

tests/modules/acl_node_test/acl_node_test.module, line 82
Dummy module implementing node related hooks to test API interaction with the Node module.

Code

function acl_node_test_node_presave(NodeInterface $node) {
  if ($node
    ->getTitle() == 'testing_node_presave') {

    // Sun, 19 Nov 1978 05:00:00 GMT
    $node
      ->setCreatedTime(280299600);

    // Drupal 1.0 release.
    $node
      ->set('changed', 979534800);
  }
}