1 node.entity.inc protected NodeStorageController::postDelete($nodes)

Overrides EntityDatabaseStorageController::postDelete().

Parameters

Node[] $nodes: An array of node entities that have just been deleted.

Overrides EntityDatabaseStorageController::postDelete

File

core/modules/node/node.entity.inc, line 694
Entity controller and class for nodes.

Class

NodeStorageController
Controller class for nodes.

Code

protected function postDelete($nodes) {
  // Delete values from other tables also referencing this node.
  $ids = array_keys($nodes);

  db_delete('history')
    ->condition('nid', $ids, 'IN')
    ->execute();
  db_delete('node_access')
    ->condition('nid', $ids, 'IN')
    ->execute();
}