You are here

function nodeaccess_node_delete in Nodeaccess 8

Same name and namespace in other branches
  1. 8.2 nodeaccess.module \nodeaccess_node_delete()
  2. 7 nodeaccess.module \nodeaccess_node_delete()

Implements hook_node_delete().

File

./nodeaccess.module, line 207
Control access to site content based on the users and roles.

Code

function nodeaccess_node_delete(EntityInterface $node) {

  // Deleting node, delete related permissions.
  \Drupal::database()
    ->delete('nodeaccess')
    ->condition('nid', $node
    ->id())
    ->execute();
}