function history_node_delete

Same name in other branches
  1. 9 core/modules/history/history.module \history_node_delete()
  2. 10 core/modules/history/history.module \history_node_delete()

Implements hook_ENTITY_TYPE_delete() for node entities.

File

core/modules/history/history.module, line 156

Code

function history_node_delete(EntityInterface $node) {
    \Drupal::database()->delete('history')
        ->condition('nid', $node->id())
        ->execute();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.