statistics_node_predelete

statistics_node_predelete(EntityInterface $node)

Implements hook_ENTITY_TYPE_predelete() for node entities.

File

core/modules/statistics/statistics.module, line 152
Logs and displays content statistics for a site.

Code

function statistics_node_predelete(EntityInterface $node) {
  // Clean up statistics table when node is deleted.
  db_delete('node_counter')
    ->condition('nid', $node->id())
    ->execute();
}
doc_Drupal
2016-10-29 09:44:27
Comments
Leave a Comment

Please login to continue.