1 node.entity.inc NodeStorageController::preDelete($nodes)

Overrides EntityDatabaseStorageController::preDelete().

Parameters

Node[] $entities: An array of node entities about to be deleted.

Overrides EntityDatabaseStorageController::preDelete

File

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

Class

NodeStorageController
Controller class for nodes.

Code

function preDelete($nodes) {
  if (module_exists('search')) {
    foreach ($nodes as $nid => $node) {
      search_reindex($node->nid, 'node');
    }
  }
}