tracker_node_predelete

tracker_node_predelete(EntityInterface $node, $arg = 0)

Implements hook_ENTITY_TYPE_predelete() for node entities.

Deletes tracking information for a node.

File

core/modules/tracker/tracker.module, line 191
Tracks recent content posted by a user or users.

Code

function tracker_node_predelete(EntityInterface $node, $arg = 0) {
  db_delete('tracker_node')
    ->condition('nid', $node->id())
    ->execute();
  db_delete('tracker_user')
    ->condition('nid', $node->id())
    ->execute();
}
doc_Drupal
2016-10-29 09:48:56
Comments
Leave a Comment

Please login to continue.